mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	* 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>
		
			
				
	
	
		
			37 lines
		
	
	
		
			777 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			777 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { BaseAPI } from "./_base";
 | |
| 
 | |
| const routes = {
 | |
|   base: "/api/admin/email",
 | |
|   forgotPassword: "/api/users/forgot-password",
 | |
| 
 | |
|   invitation: "/api/groups/invitations/email",
 | |
| };
 | |
| 
 | |
| export interface EmailResponse {
 | |
|   success: boolean;
 | |
|   error: string;
 | |
| }
 | |
| 
 | |
| export interface EmailPayload {
 | |
|   email: string;
 | |
| }
 | |
| 
 | |
| export interface InvitationEmail {
 | |
|   email: string;
 | |
|   token: string;
 | |
| }
 | |
| 
 | |
| export class EmailAPI extends BaseAPI {
 | |
|   test(payload: EmailPayload) {
 | |
|     return this.requests.post<EmailResponse>(routes.base, payload);
 | |
|   }
 | |
| 
 | |
|   sendInvitation(payload: InvitationEmail) {
 | |
|     return this.requests.post<EmailResponse>(routes.invitation, payload);
 | |
|   }
 | |
| 
 | |
|   sendForgotPassword(payload: EmailPayload) {
 | |
|     return this.requests.post<EmailResponse>(routes.forgotPassword, payload);
 | |
|   }
 | |
| }
 |