fixed updating with password changes

This commit is contained in:
Sockenklaus
2021-11-04 15:04:58 +01:00
parent 3d2e551a8e
commit 4ff0b6656d
2 changed files with 3 additions and 1 deletions

View File

@@ -4,7 +4,6 @@ import UpdateEmployeeValidator from 'App/Validators/UpdateEmployeeValidator'
import CreateEmployeeValidator from 'App/Validators/CreateEmployeeValidator'
import Database from '@ioc:Adonis/Lucid/Database'
import Logger from '@ioc:Adonis/Core/Logger'
type ResultShow = {
id: number,

View File

@@ -85,6 +85,9 @@ export default class UpdateEmployeeValidator {
table: 'employees',
column: 'username',
caseInsensitive: true,
whereNot: {
id: this.ctx.params.id
}
})
]
),