Add user POST + validation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { getAllUsersFrom, getUserInformation } from "../services/userService";
|
||||
import { getAllUsersFrom, getUserInformation, createUser } from "../services/userService";
|
||||
import { CreateUserInput } from "../validators/userValidator";
|
||||
|
||||
export async function fetchUserData(id: string) {
|
||||
return await getUserInformation(id);
|
||||
@@ -7,3 +8,7 @@ export async function fetchUserData(id: string) {
|
||||
export async function fetchAllUsers(instanceId: string) {
|
||||
return await getAllUsersFrom(instanceId);
|
||||
}
|
||||
|
||||
export async function createNewUser(data: CreateUserInput) {
|
||||
return await createUser(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user