Skip to content

Enhance data retrived through API call on /users/{username} #7197

@William-LP

Description

@William-LP
  • Gitea version 1.8.2
  • Git version: 2.16.1
  • Operating system: Windows Server 2012 R2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • [ x ] SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [ x ] Not relevant

Description

Today I had to delete all the users than never connected to the plateforme (and they were quite a lot).
I realized the API call on /users/{username} didn't provide the last-user-connection info.

What about giving the API the ability to provide the user's creation and last-connection date?

http://giteaSrv/api/v1/users/mylogin

{
  "id": 1,
  "login": "mylogin",
  "full_name": "My Full Name",
  "email": "My@E.mail",
  "avatar_url": "https://secure.gravatar.com/avatar/myavatar?d=identicon",
  "language": "en-US",
  "is_admin": false,
  "username": "myusername",
  "creation_date": "YYYY-mm-dd HH:MM:SS",
  "last_connection_date": "YYYY-mm-dd HH:MM:SS"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions