Combine settings and workspaces tables

This commit is contained in:
2024-10-27 16:00:06 +01:00
parent ab7b018f88
commit 4544af8f0f
11 changed files with 281 additions and 306 deletions

View File

@@ -22,7 +22,7 @@ func SetupRoutes(r chi.Router, db *db.DB, fs *filesystem.FileSystem) {
r.Route("/{workspaceId}", func(r chi.Router) {
r.Get("/", GetWorkspace(db))
r.Put("/", UpdateWorkspace(db))
r.Put("/", UpdateWorkspace(db, fs))
r.Delete("/", DeleteWorkspace(db))
// File routes
@@ -38,12 +38,6 @@ func SetupRoutes(r chi.Router, db *db.DB, fs *filesystem.FileSystem) {
})
// Settings routes
r.Route("/settings", func(r chi.Router) {
r.Get("/", GetWorkspaceSettings(db))
r.Put("/", UpdateWorkspaceSettings(db, fs))
})
// Git routes
r.Route("/git", func(r chi.Router) {
r.Post("/commit", StageCommitAndPush(fs))