Skip to content

Commit

Permalink
Controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
Utar94 committed Jul 22, 2024
1 parent affcde5 commit 0ecd107
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ public async Task<ActionResult<FieldType>> ReadAsync(string uniqueName, Cancella
return fieldType == null ? NotFound() : Ok(fieldType);
}

[HttpPut("{id}")]
public async Task<ActionResult<FieldType>> ReplaceAsync(Guid id, [FromBody] ReplaceFieldTypePayload payload, CancellationToken cancellationToken)
{
FieldType? fieldType = await _pipeline.ExecuteAsync(new ReplaceFieldTypeCommand(id, payload), cancellationToken);
return fieldType == null ? NotFound() : Ok(fieldType);
}

[HttpGet]
public async Task<ActionResult<SearchResults<FieldType>>> SearchAsync([FromQuery] SearchFieldTypesParameters parameters, CancellationToken cancellationToken)
{
Expand Down

0 comments on commit 0ecd107

Please sign in to comment.