Archived
Add project closing action menu
This commit is contained in:
@@ -28,6 +28,15 @@ app.post<{ Body: { name?: string; path: string; create?: boolean } }>("/api/proj
|
||||
}
|
||||
});
|
||||
|
||||
app.delete<{ Params: { projectId: string } }>("/api/projects/:projectId", async (request, reply) => {
|
||||
try {
|
||||
await projects.close(request.params.projectId);
|
||||
return { closed: true };
|
||||
} catch (error) {
|
||||
return reply.code(404).send({ error: error instanceof Error ? error.message : String(error) });
|
||||
}
|
||||
});
|
||||
|
||||
app.get<{ Querystring: { q?: string } }>("/api/project-directories", async (request, reply) => {
|
||||
try {
|
||||
return await listDirectorySuggestions(request.query.q ?? "");
|
||||
|
||||
Reference in New Issue
Block a user