mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-15 17:35:37 -04:00
chore: Nuxt 4 upgrade (#7426)
This commit is contained in:
25
frontend/app/lib/api/user/email.ts
Normal file
25
frontend/app/lib/api/user/email.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { BaseAPI } from "../base/base-clients";
|
||||
import type { EmailInitationResponse, EmailInvitation } from "~/lib/api/types/household";
|
||||
import type { ForgotPassword } from "~/lib/api/types/user";
|
||||
import type { EmailTest } from "~/lib/api/types/admin";
|
||||
|
||||
const routes = {
|
||||
base: "/api/admin/email",
|
||||
forgotPassword: "/api/users/forgot-password",
|
||||
|
||||
invitation: "/api/households/invitations/email",
|
||||
};
|
||||
|
||||
export class EmailAPI extends BaseAPI {
|
||||
test(payload: EmailTest) {
|
||||
return this.requests.post<EmailInitationResponse>(routes.base, payload);
|
||||
}
|
||||
|
||||
sendInvitation(payload: EmailInvitation) {
|
||||
return this.requests.post<EmailInitationResponse>(routes.invitation, payload);
|
||||
}
|
||||
|
||||
sendForgotPassword(payload: ForgotPassword) {
|
||||
return this.requests.post<EmailInitationResponse>(routes.forgotPassword, payload);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user