feat: add get data on couch service
parent
1fcbe57018
commit
0c3abc6a8f
|
@ -68,4 +68,15 @@ export class CouchService {
|
||||||
});
|
});
|
||||||
} catch (error) {}
|
} 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue