gitea/routers/api/v1
Tobias Balle-Petersen 3e49fba578
feat: return time of last usage for public keys and access tokens in the api (#34323)
In the Gitea GUI, the user can see the time that _AccessTokens_ and
_PublicKeys_ were last used. This information is not returned by the
_/users/{username}/tokens_ and _/user/keys_ endpoints in the API. This
PR adds the missing data.

The time of last usage for for _tokens_ & _keys_ seem to be stored in
the _Updated_ field of the structs internally. For consistency, I have
used the name _updated_at_ for the new field returned by the _API_.
However, for the _API_ user, I don't think that name reflects the data
returned, as I believe it is the time of last usage. I propose that we
use the name _last_used_at_ instead. Let's hear reviewers opinion on
that.

* PublicKey
  1. _last_used_at_: string($date-time)
* AccessToken
  1. _created_at_: string($date-time) (for parity with public keys)
  2. _last_used_at_: string($date-time)

Fix #34313
2025-05-01 21:42:17 +03:00
..
activitypub Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
admin Actions Runner rest api (#33873) 2025-04-18 15:22:41 +00:00
misc Refactor markup render to fix various path problems (#34114) 2025-04-04 23:45:23 +08:00
notify Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
org Actions Runner rest api (#33873) 2025-04-18 15:22:41 +00:00
packages Add package version api endpoints (#34173) 2025-04-13 20:00:44 +00:00
repo Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
settings Add API endpoint to request contents of multiple files simultaniously (#34139) 2025-04-22 01:20:11 +08:00
shared Actions Runner rest api (#33873) 2025-04-18 15:22:41 +00:00
swagger Add API endpoint to request contents of multiple files simultaniously (#34139) 2025-04-22 01:20:11 +08:00
user feat: return time of last usage for public keys and access tokens in the api (#34323) 2025-05-01 21:42:17 +03:00
utils Add API endpoint to request contents of multiple files simultaniously (#34139) 2025-04-22 01:20:11 +08:00
api.go Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00