feat: admin endpoints to reset username sync flags
Add POST /v1/admin/users/{pubkey}/reset-username and
POST /v1/admin/users/reset-usernames to clear manual_username
and last_synced_at so nostr profile sync re-evaluates users.
Includes OpenAPI docs, audit actions, and tests.
This commit is contained in:
@@ -79,9 +79,11 @@ func NewServer(d Deps) *http.Server {
|
||||
r.Use(middleware.AdminAuth(d.Cfg.AdminAPIKey))
|
||||
r.Post("/users", adminUsers.Add)
|
||||
r.Get("/users", adminUsers.List)
|
||||
r.Post("/users/reset-usernames", adminUsers.ResetAllUsernames)
|
||||
r.Put("/users/{pubkey}", adminUsers.Update)
|
||||
r.Delete("/users/{pubkey}", adminUsers.Delete)
|
||||
r.Post("/users/{pubkey}/extend", adminExtend.Handle)
|
||||
r.Post("/users/{pubkey}/reset-username", adminUsers.ResetUsername)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user