add column reset_password_url in api application
This commit is contained in:
@ -232,6 +232,7 @@ export class ApplicationController {
|
|||||||
const schema = Joi.object().keys({
|
const schema = Joi.object().keys({
|
||||||
id: Joi.string().max(32).required().label('ID'),
|
id: Joi.string().max(32).required().label('ID'),
|
||||||
name: Joi.string().max(256).required().label('Name'),
|
name: Joi.string().max(256).required().label('Name'),
|
||||||
|
reset_password_url: Joi.string().max(512).optional().allow('').label('Url reset password'),
|
||||||
status: Joi.string().required().label('Status'),
|
status: Joi.string().required().label('Status'),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -240,6 +241,7 @@ export class ApplicationController {
|
|||||||
const data = new Application()
|
const data = new Application()
|
||||||
data.id = param.id
|
data.id = param.id
|
||||||
data.name = param.name
|
data.name = param.name
|
||||||
|
data.reset_password_url = param.reset_password_url
|
||||||
data.status = param.status
|
data.status = param.status
|
||||||
|
|
||||||
await OrmHelper.DB.manager.save(data);
|
await OrmHelper.DB.manager.save(data);
|
||||||
@ -281,6 +283,7 @@ export class ApplicationController {
|
|||||||
try {
|
try {
|
||||||
const schema = Joi.object().keys({
|
const schema = Joi.object().keys({
|
||||||
name: Joi.string().max(256).required().label('Name'),
|
name: Joi.string().max(256).required().label('Name'),
|
||||||
|
reset_password_url: Joi.string().max(512).optional().allow('').label('Url reset password'),
|
||||||
status: Joi.string().required().label('Status'),
|
status: Joi.string().required().label('Status'),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -294,6 +297,7 @@ export class ApplicationController {
|
|||||||
|
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
data.name = param.name
|
data.name = param.name
|
||||||
|
data.reset_password_url = param.reset_password_url
|
||||||
data.status = param.status
|
data.status = param.status
|
||||||
|
|
||||||
await repo.save(data);
|
await repo.save(data);
|
||||||
|
|||||||
@ -46,6 +46,7 @@ const doc = {
|
|||||||
application: {
|
application: {
|
||||||
$id: 'ukln',
|
$id: 'ukln',
|
||||||
$name: 'Dashboard Performance Business',
|
$name: 'Dashboard Performance Business',
|
||||||
|
$reset_password_url: 'https://brilianapps.britimorleste.tl/ukln/auth/reset-password/',
|
||||||
$status: "Y"
|
$status: "Y"
|
||||||
},
|
},
|
||||||
aldeia: {
|
aldeia: {
|
||||||
|
|||||||
Reference in New Issue
Block a user