mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-13 02:06:23 +02:00
feat: Implement initial Noteflow application UI, foundational notes management, and mobile notes page.
This commit is contained in:
1 parent
ad3f415469
commit
4ba078bf4e
4 files changed
+416
-363
No files matched your search
@@ -63,6 +63,23 @@ class NotesService {
|
||||
}
|
||||
}
|
||||
|
||||
async getCounts(): Promise<{ active: number; archived: number }> {
|
||||
try {
|
||||
const response = await fetch("/api/notes/counts", {
|
||||
headers: AuthService.getHeaders()
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Erreur lors de la récupération des compteurs");
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error("Erreur compteur:", error);
|
||||
return { active: 0, archived: 0 };
|
||||
}
|
||||
}
|
||||
|
||||
async createNote(title: string, content: string = ""): Promise<Note | null> {
|
||||
try {
|
||||
const response = await fetch("/api/notes", {
|
||||
|
||||
Reference in new issue
Block a user