mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
fix: add missing types for API token deletion (#1428)
This commit is contained in:
parent
292bf7068a
commit
c158672d12
@ -66,6 +66,8 @@ export interface UserOut {
|
||||
}
|
||||
export interface LongLiveTokenOut {
|
||||
token: string;
|
||||
name: string;
|
||||
id: number;
|
||||
}
|
||||
export interface ReadGroupPreferences {
|
||||
privateGroup?: boolean;
|
||||
|
@ -33,7 +33,7 @@ class UserApiTokensController(BaseUserController):
|
||||
new_token_in_db = self.repos.api_tokens.create(token_model)
|
||||
|
||||
if new_token_in_db:
|
||||
return LongLiveTokenOut(token=token)
|
||||
return new_token_in_db
|
||||
|
||||
@router.delete("/api-tokens/{token_id}", response_model=DeleteTokenResponse)
|
||||
def delete_api_token(self, token_id: int):
|
||||
|
@ -23,6 +23,8 @@ class LongLiveTokenIn(MealieModel):
|
||||
|
||||
class LongLiveTokenOut(MealieModel):
|
||||
token: str
|
||||
name: str
|
||||
id: int
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user