Workspace white screen error resolved, issue was when we migrated from the local SQLite database to the Client-Server architecture during Phase 2, we didn't implement backend endpoints for adding, updating, or deleting users. Because the app.jsx file had nowhere to send those requests, the buttons didn't do anything

This commit is contained in:
NPS Agent
2026-05-11 15:23:49 +09:30
parent d959c89d5f
commit 39d26be447
7 changed files with 128 additions and 8 deletions
+26
View File
@@ -66,6 +66,32 @@ class ApiService {
return this.request('/users');
}
async createUser(userData) {
const data = await this.request('/users', {
method: 'POST',
body: JSON.stringify(userData),
});
this.notify();
return data;
}
async updateUser(id, updates) {
const data = await this.request(`/users/${id}`, {
method: 'PATCH',
body: JSON.stringify(updates),
});
this.notify();
return data;
}
async deleteUser(id) {
const data = await this.request(`/users/${id}`, {
method: 'DELETE',
});
this.notify();
return data;
}
async getTasks() {
return this.request('/tasks');
}