Add download and upload to the sidebar, along with mocks

This commit is contained in:
Eli Ribble 2026-02-17 17:29:15 +00:00
parent 61737d0288
commit e5b6135e44
No known key found for this signature in database
6 changed files with 398 additions and 0 deletions

14
sync/download.go Normal file
View file

@ -0,0 +1,14 @@
package sync
import (
"context"
"github.com/Gleipnir-Technology/nidus-sync/db/models"
)
type contentDownloadPlaceholder struct{}
func getDownloadList(ctx context.Context, user *models.User) (string, interface{}, *errorWithStatus) {
content := contentSettingPlaceholder{}
return "sync/download-list.html", content, nil
}

View file

@ -47,6 +47,7 @@ func Router() chi.Router {
r.Route("/api", api.AddRoutes)
r.Method("GET", "/admin", authenticatedHandler(getAdminDash))
r.Method("GET", "/cell/{cell}", auth.NewEnsureAuth(getCellDetails))
r.Method("GET", "/download", authenticatedHandler(getDownloadList))
r.Method("GET", "/layout-test", auth.NewEnsureAuth(getLayoutTest))
r.Method("GET", "/message", authenticatedHandler(getMessageList))
r.Method("GET", "/notification", auth.NewEnsureAuth(getNotificationList))
@ -67,6 +68,7 @@ func Router() chi.Router {
r.Method("GET", "/stadia", auth.NewEnsureAuth(getStadia))
r.Method("GET", "/trap/{globalid}", auth.NewEnsureAuth(getTrap))
r.Method("GET", "/text/{destination}", auth.NewEnsureAuth(getTextMessages))
r.Method("GET", "/upload", authenticatedHandler(getUploadList))
html.AddStaticRoute(r, "/static")
return r

14
sync/upload.go Normal file
View file

@ -0,0 +1,14 @@
package sync
import (
"context"
"github.com/Gleipnir-Technology/nidus-sync/db/models"
)
type contentUploadPlaceholder struct{}
func getUploadList(ctx context.Context, user *models.User) (string, interface{}, *errorWithStatus) {
content := contentUploadPlaceholder{}
return "sync/upload-list.html", content, nil
}