diff --git a/sync/dash.go b/sync/dash.go index 8aa91123..b99d1c93 100644 --- a/sync/dash.go +++ b/sync/dash.go @@ -135,19 +135,6 @@ func getRoot(w http.ResponseWriter, r *http.Request) { } } -func getSettings(w http.ResponseWriter, r *http.Request, u *models.User) { - userContent, err := contentForUser(r.Context(), u) - if err != nil { - respondError(w, "Failed to get user content", err, http.StatusInternalServerError) - return - } - data := ContentAuthenticatedPlaceholder{ - URL: newContentURL(), - User: userContent, - } - html.RenderOrError(w, "sync/settings.html", data) -} - func getSource(w http.ResponseWriter, r *http.Request, u *models.User) { globalid_s := chi.URLParam(r, "globalid") if globalid_s == "" { diff --git a/sync/setting.go b/sync/setting.go new file mode 100644 index 00000000..1d0540ad --- /dev/null +++ b/sync/setting.go @@ -0,0 +1,21 @@ +package sync + +import ( + "net/http" + + "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/Gleipnir-Technology/nidus-sync/html" +) + +func getSettings(w http.ResponseWriter, r *http.Request, u *models.User) { + userContent, err := contentForUser(r.Context(), u) + if err != nil { + respondError(w, "Failed to get user content", err, http.StatusInternalServerError) + return + } + data := ContentAuthenticatedPlaceholder{ + URL: newContentURL(), + User: userContent, + } + html.RenderOrError(w, "sync/settings.html", data) +}