Added HTTP Method "patch" to CORS, fixed a bug that prevented shorthands to be shown.
This commit is contained in:
@@ -100,6 +100,7 @@ export default class EmployeesController {
|
||||
result.employee.id = emp.id
|
||||
result.employee.firstName = emp.firstName
|
||||
result.employee.lastName = emp.lastName
|
||||
result.employee.shorthand = emp.shorthand
|
||||
result.employee.phone = emp.phone
|
||||
result.employee.mobile = emp.mobile
|
||||
result.employee.email = emp.email
|
||||
@@ -118,6 +119,7 @@ export default class EmployeesController {
|
||||
|
||||
public async update ({params, bouncer, response, request}: HttpContextContract) {
|
||||
|
||||
|
||||
const employee : Employee = await Employee.findOrFail(params.id)
|
||||
const editContractHours : boolean = employee.contractHours !== request.input('contractHours')
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ const corsConfig: CorsConfig = {
|
||||
|
|
||||
| Following is the list of default methods. Feel free to add more.
|
||||
*/
|
||||
methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE'],
|
||||
methods: ['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user