1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-12 03:58:59 +00:00

feat: add option to renew API key (#1214)

This commit is contained in:
Elias Schneider
2026-01-09 12:08:58 +01:00
committed by GitHub
parent 0a94f0fd64
commit 811e8772b6
16 changed files with 321 additions and 41 deletions

View File

@@ -266,6 +266,13 @@ func (e *APIKeyNotFoundError) Error() string {
}
func (e *APIKeyNotFoundError) HttpStatusCode() int { return http.StatusUnauthorized }
type APIKeyNotExpiredError struct{}
func (e *APIKeyNotExpiredError) Error() string {
return "API Key is not expired yet"
}
func (e *APIKeyNotExpiredError) HttpStatusCode() int { return http.StatusBadRequest }
type APIKeyExpirationDateError struct{}
func (e *APIKeyExpirationDateError) Error() string {