Add download and upload to the sidebar, along with mocks
This commit is contained in:
parent
61737d0288
commit
e5b6135e44
6 changed files with 398 additions and 0 deletions
14
sync/download.go
Normal file
14
sync/download.go
Normal 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
|
||||
}
|
||||
|
|
@ -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
14
sync/upload.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue