profiles: add routes for viewing/modifying

most of Profile struct is now in ProfileDTO (which is embedded in the
former), admin can pull it from /profiles/raw/{name} GET, and replace it
with PUT. Will make a ui for this.
This commit is contained in:
Harvey Tindall
2025-11-28 12:06:17 +00:00
parent 836974e1b2
commit 815721adb2
4 changed files with 84 additions and 16 deletions
+2
View File
@@ -214,6 +214,8 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
api.POST(p+"/invites/profile", app.SetProfile)
api.GET(p+"/profiles", app.GetProfiles)
api.GET(p+"/profiles/names", app.GetProfileNames)
api.GET(p+"/profiles/raw/:name", app.GetRawProfile)
api.PUT(p+"/profiles/raw/:name", app.ReplaceRawProfile)
api.POST(p+"/profiles/default", app.SetDefaultProfile)
api.POST(p+"/profiles", app.CreateProfile)
api.DELETE(p+"/profiles", app.DeleteProfile)