fixed updating with password changes
This commit is contained in:
@@ -4,7 +4,6 @@ import UpdateEmployeeValidator from 'App/Validators/UpdateEmployeeValidator'
|
|||||||
import CreateEmployeeValidator from 'App/Validators/CreateEmployeeValidator'
|
import CreateEmployeeValidator from 'App/Validators/CreateEmployeeValidator'
|
||||||
|
|
||||||
import Database from '@ioc:Adonis/Lucid/Database'
|
import Database from '@ioc:Adonis/Lucid/Database'
|
||||||
import Logger from '@ioc:Adonis/Core/Logger'
|
|
||||||
|
|
||||||
type ResultShow = {
|
type ResultShow = {
|
||||||
id: number,
|
id: number,
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ export default class UpdateEmployeeValidator {
|
|||||||
table: 'employees',
|
table: 'employees',
|
||||||
column: 'username',
|
column: 'username',
|
||||||
caseInsensitive: true,
|
caseInsensitive: true,
|
||||||
|
whereNot: {
|
||||||
|
id: this.ctx.params.id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user