(userId: any)
| 10 | const notesDB = {}; |
| 11 | |
| 12 | async function getUserNotes(userId: any) { |
| 13 | if (HAS_DB) { |
| 14 | const notes = await store.getSetting(userId, 'notes'); |
| 15 | return (notes as any) || []; |
| 16 | } else { |
| 17 | return (notesDB as any)[userId] || []; |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | async function saveUserNotes(userId: any, notes: any) { |
| 22 | if (HAS_DB) { |