mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix: send auth token with monographs get request
This commit is contained in:
@@ -16,7 +16,10 @@ class Monograph {
|
|||||||
const token = await this._db.user.tokenManager.getAccessToken();
|
const token = await this._db.user.tokenManager.getAccessToken();
|
||||||
if (!user || !token || !user.isEmailConfirmed) return;
|
if (!user || !token || !user.isEmailConfirmed) return;
|
||||||
try {
|
try {
|
||||||
const userMonographs = await http.get(`${Constants.API_HOST}/monographs`);
|
const userMonographs = await http.get(
|
||||||
|
`${Constants.API_HOST}/monographs`,
|
||||||
|
token
|
||||||
|
);
|
||||||
this.monographs = userMonographs.reduce((prev, curr) => {
|
this.monographs = userMonographs.reduce((prev, curr) => {
|
||||||
prev[curr.noteId] = curr.id;
|
prev[curr.noteId] = curr.id;
|
||||||
return prev;
|
return prev;
|
||||||
|
|||||||
Reference in New Issue
Block a user