Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DevNono committed Aug 21, 2023
1 parent 28aac23 commit e4c3ae4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/controllers/admin/users/createUser.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import Joi from 'joi';
import { NextFunction, Request, Response } from 'express';
import { UserAge } from '@prisma/client';
import { hasPermission } from '../../../middlewares/authentication';
import { Permission, Error } from '../../../types';
import { conflict, forbidden, success } from '../../../utils/responses';
import { createUser, removeUserRegisterToken } from '../../../operations/user';
import { filterUser } from '../../../utils/filters';
import { validateBody } from '../../../middlewares/validation';
import * as validators from '../../../utils/validators';
import { getRequestInfo } from '../../../utils/users';
import { UserAge } from '@prisma/client';

export default [
// Middlewares
Expand All @@ -28,8 +27,7 @@ export default [
// Controller
async (request: Request, response: Response, next: NextFunction) => {
try {
const { permissions, customMessage, email, username, firstname, lastname, password } =
request.body;
const { permissions, customMessage, email, username, firstname, lastname, password } = request.body;

// Check that permissions are not in the request body or that the initiator
// is admin
Expand Down
1 change: 0 additions & 1 deletion src/operations/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
} from '../types';
import { deserializePermissions, serializePermissions } from '../utils/helpers';
import { fetchAllItems } from './item';
import { permission } from '../utils/validators';

export const userInclusions = {
cartItems: {
Expand Down

0 comments on commit e4c3ae4

Please sign in to comment.