mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-20 19:53:41 +09:00
refactor(api): convert bot accounts through the admin user edit endpoint (#39355)
Follow-up to https://github.com/go-gitea/gitea/pull/38966. Replaces the unreleased `POST /admin/users/{username}/convert-type` endpoint with a `type` field on `PATCH /admin/users/{username}`.
This commit is contained in:
@@ -76,13 +76,6 @@ type EditUserOption struct {
|
||||
Restricted *bool `json:"restricted"`
|
||||
// User visibility level: public, limited, or private
|
||||
Visibility VisibilityString `json:"visibility" binding:"In(,public,limited,private)"`
|
||||
}
|
||||
|
||||
// ConvertUserTypeOption options when converting a user between individual and bot
|
||||
type ConvertUserTypeOption struct {
|
||||
// The target user type
|
||||
//
|
||||
// required: true
|
||||
// enum: ["User","Bot"]
|
||||
UserType UserTypeString `json:"user_type" binding:"Required;In(User,Bot)"`
|
||||
// The user type
|
||||
Type UserTypeString `json:"type" binding:"In(User,Organization,Bot)"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user