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
@@ -13,6 +13,13 @@ export default class ApiKeyService extends APIService {
return res.data as ApiKeyResponse;
};
renew = async (id: string, expiresAt: Date): Promise<ApiKeyResponse> => {
const res = await this.api.post(`/api-keys/${id}/renew`, {
expiresAt
});
return res.data as ApiKeyResponse;
};
revoke = async (id: string): Promise<void> => {
await this.api.delete(`/api-keys/${id}`);
};