mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 22:59:41 +02:00
feat(frontend): ✨ Fix scheduler, forgot password flow, and minor bug fixes (#725)
* feat(frontend): 💄 add recipe title * fix(frontend): 🐛 fixes #722 side-bar issue * feat(frontend): ✨ Add page titles to all pages * minor cleanup * refactor(backend): ♻️ rewrite scheduler to be more modulare and work * feat(frontend): ✨ start password reset functionality * refactor(backend): ♻️ refactor application settings to facilitate dependency injection * refactor(backend): 🔥 remove RECIPE_SETTINGS env variables in favor of group settings * formatting * refactor(backend): ♻️ align naming convention * feat(backend): ✨ password reset * test(backend): ✅ password reset * feat(frontend): ✨ self-service password reset * purge password schedule * update user creation for tests Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
parent
d1f0441252
commit
2e9026f9ea
121 changed files with 1461 additions and 679 deletions
|
@ -16,12 +16,20 @@ interface ResponseToken {
|
|||
token: string;
|
||||
}
|
||||
|
||||
interface PasswordResetPayload {
|
||||
token: string;
|
||||
email: string;
|
||||
password: string;
|
||||
passwordConfirm: string;
|
||||
}
|
||||
|
||||
// Code
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
const routes = {
|
||||
usersSelf: `${prefix}/users/self`,
|
||||
passwordReset: `${prefix}/users/reset-password`,
|
||||
users: `${prefix}/users`,
|
||||
|
||||
usersIdImage: (id: string) => `${prefix}/users/${id}/image`,
|
||||
|
@ -55,10 +63,6 @@ export class UserApi extends BaseCRUDAPI<UserOut, UserIn> {
|
|||
return await this.requests.put(routes.usersIdPassword(id), changePassword);
|
||||
}
|
||||
|
||||
async resetPassword(id: string) {
|
||||
return await this.requests.post(routes.usersIdResetPassword(id), {});
|
||||
}
|
||||
|
||||
async createAPIToken(tokenName: CreateAPIToken) {
|
||||
return await this.requests.post<ResponseToken>(routes.usersApiTokens, tokenName);
|
||||
}
|
||||
|
@ -71,4 +75,8 @@ export class UserApi extends BaseCRUDAPI<UserOut, UserIn> {
|
|||
if (!id || id === undefined) return;
|
||||
return `/api/users/${id}/image`;
|
||||
}
|
||||
|
||||
async resetPassword(payload: PasswordResetPayload) {
|
||||
return await this.requests.post(routes.passwordReset, payload);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue