mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	feat(frontend): ✨ add group permissions (#721)
* style(frontend): 💄 add darktheme custom * add dummy users in dev mode * feat(frontend): ✨ add group permissions editor UI * feat(backend): ✨ add group permissions setters * test(backend): ✅ tests for basic permission get/set (WIP) Needs more testing * remove old test * chore(backend): copy template.env on setup * feat(frontend): ✨ enable send invitation via email * feat(backend): ✨ enable send invitation via email * feat: ✨ add app config checker for site-settings * refactor(frontend): ♻️ consolidate bool checks Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
		| @@ -2,6 +2,8 @@ import { BaseAPI } from "./_base"; | ||||
|  | ||||
| const routes = { | ||||
|   base: "/api/admin/email", | ||||
|  | ||||
|   invitation: "/api/groups/invitations/email", | ||||
| }; | ||||
|  | ||||
| export interface CheckEmailResponse { | ||||
| @@ -17,6 +19,16 @@ export interface TestEmailPayload { | ||||
|   email: string; | ||||
| } | ||||
|  | ||||
| export interface InvitationEmail { | ||||
|   email: string; | ||||
|   token: string; | ||||
| } | ||||
|  | ||||
| export interface InvitationEmailResponse { | ||||
|   success: boolean; | ||||
|   error: string; | ||||
| } | ||||
|  | ||||
| export class EmailAPI extends BaseAPI { | ||||
|   check() { | ||||
|     return this.requests.get<CheckEmailResponse>(routes.base); | ||||
| @@ -25,4 +37,8 @@ export class EmailAPI extends BaseAPI { | ||||
|   test(payload: TestEmailPayload) { | ||||
|     return this.requests.post<TestEmailResponse>(routes.base, payload); | ||||
|   } | ||||
|  | ||||
|   sendInvitation(payload: InvitationEmail) { | ||||
|     return this.requests.post<InvitationEmailResponse>(routes.invitation, payload); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user