🚑 fixed note requires password when note is not private

This commit is contained in:
Chirag Bhalotia 2023-06-24 21:21:12 +05:30
parent 4b29715b1d
commit 80f42b01c1
No known key found for this signature in database
GPG Key ID: F7F1F1FBFFD40427
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ export class Notes {
return data;
}
async getSingleNote(id: string, passkey: string = '') {
const res = await this.axios.get(`/gist/${id}`, { params: { passkey } });
const res = await this.axios.get(`/gist/${id}`, {
params: passkey ? { passkey } : {},
});
const data = res.data.data as INote;
return data;
}