clean up
This commit is contained in:
@@ -4,17 +4,19 @@ import { UMB_SLUG } from './slug.js';
|
||||
import { InviteUserRequestModel } from '@umbraco-cms/backoffice/backend-api';
|
||||
import { umbracoPath } from '@umbraco-cms/backoffice/utils';
|
||||
|
||||
const inviteSlug = `${UMB_SLUG}/invite`;
|
||||
|
||||
export const handlers = [
|
||||
rest.post<InviteUserRequestModel>(umbracoPath(`${UMB_SLUG}/invite`), async (req, res, ctx) => {
|
||||
rest.post<InviteUserRequestModel>(umbracoPath(`${inviteSlug}`), async (req, res, ctx) => {
|
||||
const data = await req.json();
|
||||
if (!data) return;
|
||||
|
||||
umbUsersData.invite(data);
|
||||
|
||||
return res(ctx.status(200));
|
||||
return res(ctx.status(201));
|
||||
}),
|
||||
|
||||
rest.post<any>(umbracoPath(`${UMB_SLUG}/invite/resend`), async (req, res, ctx) => {
|
||||
rest.post<any>(umbracoPath(`${inviteSlug}/resend`), async (req, res, ctx) => {
|
||||
const data = await req.json();
|
||||
if (!data) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user