Skip to content

Commit

Permalink
feat: ability to upsert single legal values
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Jan 3, 2025
1 parent 20dae18 commit 0e7aab6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/features/context/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ test('should add and update a single context field with new legal values', async

// invalid schema
await request
.post(`${base}/api/admin/context/environment/legalValues`)
.post(`${base}/api/admin/context/environment/legal-values`)
.send({
valueInvalid: 'invalid schema',
description: 'Local environment',
Expand All @@ -176,7 +176,7 @@ test('should add and update a single context field with new legal values', async

// add a new context field legal value
await request
.post(`${base}/api/admin/context/environment/legalValues`)
.post(`${base}/api/admin/context/environment/legal-values`)
.send({
value: 'newvalue',
description: 'new description',
Expand All @@ -186,7 +186,7 @@ test('should add and update a single context field with new legal values', async

// update existing context field legal value description
await request
.post(`${base}/api/admin/context/environment/legalValues`)
.post(`${base}/api/admin/context/environment/legal-values`)
.send({
value: 'newvalue',
description: 'updated description',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/features/context/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class ContextController extends Controller {

this.route({
method: 'post',
path: '/:contextField/legalValues',
path: '/:contextField/legal-values',
handler: this.updateContextFieldLegalValue,
permission: UPDATE_CONTEXT_FIELD,
middleware: [
Expand Down

0 comments on commit 0e7aab6

Please sign in to comment.