Revize c0c74381
Přidáno uživatelem Vojtěch Bartička před asi 3 roky(ů)
Backend/Backend/Controllers/AnnotationController.cs | ||
---|---|---|
45 | 45 |
return Ok(); |
46 | 46 |
} |
47 | 47 |
|
48 |
[HttpGet("/annotation")] |
|
48 |
[HttpGet("/annotation/{annotationId}")]
|
|
49 | 49 |
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(AnnotationInfo))] |
50 | 50 |
[ProducesResponseType((int)HttpStatusCode.Forbidden)] |
51 |
public ActionResult<AnnotationInfo> GetAnnotation([FromServices] ClientInfo clientInfo, [FromBody] AnnotationGetRequest request)
|
|
51 |
public ActionResult<AnnotationInfo> GetAnnotation([FromServices] ClientInfo clientInfo, Guid annotationId)
|
|
52 | 52 |
{ |
53 | 53 |
if (clientInfo.LoggedUser == null) |
54 | 54 |
{ |
... | ... | |
60 | 60 |
// non-existent annotation |
61 | 61 |
try |
62 | 62 |
{ |
63 |
var res = annotationService.GetAnnotation(request.AnnotationId, clientInfo.LoggedUser.Id, clientInfo.LoggedUser.Role);
|
|
63 |
var res = annotationService.GetAnnotation(annotationId, clientInfo.LoggedUser.Id, clientInfo.LoggedUser.Role);
|
|
64 | 64 |
return Ok(res); |
65 | 65 |
} |
66 | 66 |
catch (InvalidOperationException e) |
Také k dispozici: Unified diff
Annotation controller id in path, not request body