test(update-auth-client): cover HTTP 422 response

This commit is contained in:
Ali BARIN
2024-08-28 08:46:13 +00:00
parent 09bc0bba1e
commit 61ff6986d3
2 changed files with 25 additions and 3 deletions

View File

@@ -2,10 +2,8 @@ import { renderObject } from '../../../../../helpers/renderer.js';
import AppAuthClient from '../../../../../models/app-auth-client.js';
export default async (request, response) => {
const id = request.params.appAuthClientId;
const appAuthClient = await AppAuthClient.query()
.findById(id)
.findById(request.params.appAuthClientId)
.throwIfNotFound();
await appAuthClient.$query().patchAndFetch(appAuthClientParams(request));