Skip to content

Error 422 on admin user delete #13

@ashrude

Description

@ashrude

Hi, I accidentally left my gitea instance open for a good amount of time and I recently found out I have 500 spam users. I was attempting to use gitea-js to go through and delete them but api.admin.adminDeleteUser() fails with a 422 Unprocessable Entity error.

error: Uncaught (in promise) Response {
  body: ReadableStream { locked: true },
  bodyUsed: true,
  headers: Headers {
    "cache-control": "max-age=0, private, must-revalidate, no-transform",
    connection: "keep-alive",
    "content-length": "110",
    "content-type": "application/json;charset=utf-8",
    date: "Mon, 07 Oct 2024 17:39:05 GMT",
    server: "nginx/1.20.1",
    "x-content-type-options": "nosniff",
    "x-frame-options": "SAMEORIGIN"
  },
  ok: false,
  redirected: true,
  status: 422,
  statusText: "Unprocessable Entity",
  url: "https://..../api/v1/admin/users/adansantoro140"
}

I'm using gitea 1.22.1, the api token has access to everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions