feat: add get data on couch service

pull/57/head
Firman Ramdhani 2024-08-07 16:41:13 +07:00
parent 1fcbe57018
commit 0c3abc6a8f
1 changed files with 11 additions and 0 deletions

View File

@ -68,4 +68,15 @@ export class CouchService {
});
} catch (error) {}
}
public async getDoc(id: string, database: string) {
try {
const nano = this.nanoInstance;
const db = nano.use(database);
const result = await db.get(id);
return result;
} catch (error) {
return null;
}
}
}