Tobias Balle-Petersen
3e49fba578
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run
cron-translations / crowdin-pull (push) Has been skipped
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
..
2025-04-03 05:13:16 +00:00
2024-12-15 10:41:29 +00:00
2025-01-09 09:21:47 +08:00
2025-03-31 01:53:48 -04:00
2025-01-09 21:09:11 +08:00
2025-04-01 10:14:01 +00:00
2025-04-01 09:42:10 +00:00
2025-03-10 15:57:17 +08:00
2025-04-13 09:40:36 +00:00
2025-04-09 16:34:38 +00:00
2025-03-31 01:53:48 -04:00
2024-11-11 04:07:54 +08:00
2025-03-31 01:53:48 -04:00
2025-03-31 01:53:48 -04:00
2025-01-09 09:21:47 +08:00
2025-01-09 09:21:47 +08:00
2025-04-28 19:51:32 -07:00
2024-02-16 15:18:30 +00:00
2025-04-28 19:51:32 -07:00
2025-04-02 17:31:32 +00:00
2025-04-01 10:14:01 +00:00
2025-03-31 01:53:48 -04:00
2025-03-29 17:32:28 -04:00
2023-01-29 09:49:51 -06:00
2025-03-31 01:53:48 -04:00
2024-09-11 05:47:00 +00:00
2025-01-08 03:44:32 +00:00
2025-03-13 07:04:50 +08:00
2025-04-22 06:49:37 +08:00
2025-04-23 21:22:40 +00:00
2025-04-01 10:14:01 +00:00
2025-03-24 20:26:58 -07:00
2025-04-10 17:18:07 +00:00
2025-04-01 10:14:01 +00:00
2025-04-01 10:14:01 +00:00
2025-03-31 01:53:48 -04:00
2025-04-20 19:18:14 +08:00
2022-11-27 18:20:29 +00:00
2024-05-27 08:59:54 +00:00
2025-03-14 00:28:57 +00:00
2025-01-09 09:21:47 +08:00
2025-03-31 01:53:48 -04:00
2023-04-12 18:16:45 +08:00
2025-04-08 16:15:28 +00:00
2025-03-23 19:52:43 +00:00
2022-11-27 18:20:29 +00:00
2025-04-01 10:14:01 +00:00
2025-02-20 09:57:40 +00:00
2023-02-11 08:39:50 +08:00
2025-04-01 10:14:01 +00:00
2025-03-13 07:04:50 +08:00
2025-03-31 01:53:48 -04:00
2022-11-27 18:20:29 +00:00
2025-03-31 01:53:48 -04:00
2025-03-31 01:53:48 -04:00
2025-04-12 18:22:18 +00:00
2025-03-10 15:57:17 +08:00
2025-02-21 00:05:40 +08:00
2025-04-28 15:31:59 -07:00
2025-04-28 15:31:59 -07:00
2022-12-30 23:31:00 +08:00
2025-04-08 16:15:28 +00:00
2025-04-01 10:14:01 +00:00
2025-05-01 21:42:17 +03:00
2024-12-24 01:54:19 +00:00
2024-09-06 10:12:41 +00:00
2025-03-31 01:53:48 -04:00
2025-01-21 18:57:07 +00:00
2025-04-08 16:15:28 +00:00
2025-04-24 09:11:54 +08:00
2025-04-01 10:14:01 +00:00
2025-02-20 09:57:40 +00:00
2024-11-04 11:30:00 +00:00
2025-03-31 01:53:48 -04:00
2023-02-05 15:29:03 +08:00
2024-11-15 00:55:50 +00:00
2025-04-01 10:14:01 +00:00
2022-11-27 18:20:29 +00:00
2025-01-09 09:21:47 +08:00
2025-04-08 16:15:28 +00:00
2025-04-01 10:14:01 +00:00
2025-04-01 10:14:01 +00:00
2025-03-11 10:40:38 -07:00
2024-08-09 10:10:30 +08:00