create note added
This commit is contained in:
+4
-2
@@ -801,7 +801,7 @@ export const initStore = async () => {
|
||||
|
||||
// 1.2 Fetch Buckets
|
||||
try {
|
||||
const buckets = await pb.collection(BUCKETS_COLLECTION).getFullList({ sort: 'name' });
|
||||
const buckets = await pb.collection(BUCKETS_COLLECTION).getFullList({ sort: 'name', requestKey: null });
|
||||
setStore("buckets", buckets.map((b: any) => ({
|
||||
id: b.id,
|
||||
name: b.name,
|
||||
@@ -817,7 +817,8 @@ export const initStore = async () => {
|
||||
const currentUserId = pb.authStore.model?.id;
|
||||
const notesRecords = await pb.collection(NOTES_COLLECTION).getFullList({
|
||||
filter: `isPrivate = false || user = "${currentUserId}"`,
|
||||
sort: '-created'
|
||||
sort: '-created',
|
||||
requestKey: null
|
||||
});
|
||||
setStore("notes", notesRecords.map(mapRecordToNote));
|
||||
} catch (notesErr) {
|
||||
@@ -828,6 +829,7 @@ export const initStore = async () => {
|
||||
try {
|
||||
const tagRecords = await pb.collection(TAGS_COLLECTION).getFullList({
|
||||
filter: `user = "${pb.authStore.model?.id}"`,
|
||||
requestKey: null
|
||||
});
|
||||
const loadedTags: TagDefinition[] = tagRecords.map(r => ({
|
||||
id: r.id,
|
||||
|
||||
Reference in New Issue
Block a user