update profile and password
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Request, Response, NextFunction, Application } from "express";
|
||||
import { Response, NextFunction, Application } from "express";
|
||||
import { Request } from "express-jwt";
|
||||
import { ReturnHelper } from "../helpers/express/return";
|
||||
import { OrmHelper } from "../helpers/orm";
|
||||
import { User } from "../entity/users";
|
||||
@ -161,12 +162,6 @@ export class UserController {
|
||||
#swagger.security = [{
|
||||
"bearerAuth": []
|
||||
}]
|
||||
#swagger.parameters['id'] = {
|
||||
in: 'path',
|
||||
description: 'User ID.',
|
||||
required: true,
|
||||
type: 'string'
|
||||
}
|
||||
|
||||
#swagger.requestBody = {
|
||||
required: true,
|
||||
@ -188,7 +183,7 @@ export class UserController {
|
||||
name: Joi.string().max(64).required().label('Name'),
|
||||
});
|
||||
|
||||
req.body.id = req.params['id'];
|
||||
req.body.id = req.auth.data.id;
|
||||
|
||||
const param: User = await schema.validateAsync(req.body);
|
||||
|
||||
@ -221,12 +216,6 @@ export class UserController {
|
||||
#swagger.security = [{
|
||||
"bearerAuth": []
|
||||
}]
|
||||
#swagger.parameters['id'] = {
|
||||
in: 'path',
|
||||
description: 'User ID.',
|
||||
required: true,
|
||||
type: 'string'
|
||||
}
|
||||
|
||||
#swagger.requestBody = {
|
||||
required: true,
|
||||
@ -247,7 +236,7 @@ export class UserController {
|
||||
retype_password: Joi.ref('password'),
|
||||
});
|
||||
|
||||
req.body.id = req.params['id'];
|
||||
req.body.id = req.auth.data.id;
|
||||
|
||||
const param: User = await schema.validateAsync(req.body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user