1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-22 06:39:41 +02:00

feat: implement user favorites page (#1376)

* fix geFavorites return

* add support for toggling to dense cards on desktop

* add favorites page link

* implement basic favorites page
This commit is contained in:
Hayden 2022-06-13 09:33:46 -08:00 committed by GitHub
parent f6c18ec73d
commit 3030e3e7f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 19 deletions

View file

@ -1,5 +1,15 @@
import { BaseCRUDAPI } from "../_base";
import { ChangePassword, DeleteTokenResponse, LongLiveTokenIn, LongLiveTokenOut, ResetPassword, UserBase, UserIn, UserOut } from "~/types/api-types/user";
import {
ChangePassword,
DeleteTokenResponse,
LongLiveTokenIn,
LongLiveTokenOut,
ResetPassword,
UserBase,
UserFavorites,
UserIn,
UserOut,
} from "~/types/api-types/user";
const prefix = "/api";
@ -32,7 +42,7 @@ export class UserApi extends BaseCRUDAPI<UserIn, UserOut, UserBase> {
}
async getFavorites(id: string) {
await this.requests.get(routes.usersIdFavorites(id));
return await this.requests.get<UserFavorites>(routes.usersIdFavorites(id));
}
async changePassword(id: string, changePassword: ChangePassword) {