Add listProjectTasks to collab service
cgen-a73feec9607e4d94bc1a4dacefc29032
This commit is contained in:
parent
40f0e4b00a
commit
00d7310089
1 changed files with 10 additions and 0 deletions
|
|
@ -57,6 +57,16 @@ export const aethexCollabService = {
|
|||
},
|
||||
|
||||
// Tasks
|
||||
async listProjectTasks(projectId: string) {
|
||||
const { data, error } = await supabase
|
||||
.from("project_tasks")
|
||||
.select("*, assignee:assignee_id ( id, full_name, username, avatar_url )")
|
||||
.eq("project_id", projectId)
|
||||
.order("created_at", { ascending: true });
|
||||
if (error) return [] as any[];
|
||||
return (data || []) as any[];
|
||||
},
|
||||
|
||||
async createTask(projectId: string, title: string, description?: string | null, assigneeId?: string | null, dueDate?: string | null) {
|
||||
const { data, error } = await supabase
|
||||
.from("project_tasks")
|
||||
|
|
|
|||
Loading…
Reference in a new issue