fix user handler
This commit is contained in:
@@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import { umbUsersData } from '../data/users.data';
|
||||
import { umbracoPath } from '@umbraco-cms/backoffice/utils';
|
||||
|
||||
const slug = '/users';
|
||||
const slug = '/user';
|
||||
|
||||
export const handlers = [
|
||||
rest.get(umbracoPath(`${slug}`), (req, res, ctx) => {
|
||||
@@ -13,6 +13,13 @@ export const handlers = [
|
||||
return res(ctx.status(200), ctx.json(response));
|
||||
}),
|
||||
|
||||
rest.get(umbracoPath(`${slug}/filter`), (req, res, ctx) => {
|
||||
//TODO: Implementer filter
|
||||
const response = umbUsersData.getAll();
|
||||
|
||||
return res(ctx.status(200), ctx.json(response));
|
||||
}),
|
||||
|
||||
rest.get(umbracoPath(`${slug}/:id`), (req, res, ctx) => {
|
||||
const id = req.params.id as string;
|
||||
if (!id) return;
|
||||
|
||||
Reference in New Issue
Block a user