Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 4733e8c2

Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)

Endpoint for user annotations with ID in path

Zobrazit rozdíly:

Backend/Backend/Controllers/UserController.cs
63 63
            var res = annotationService.GetUserAnnotations(clientInfo.LoggedUser.Id);
64 64
            return Ok(res);
65 65
        }
66

  
67
        [HttpGet("/user/{userId}/annotations")]
68
        [Authorize(Models.Enums.ERole.ADMINISTRATOR)]
69
        [ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(AnnotationListResponse))]
70
        [ProducesResponseType((int)HttpStatusCode.Forbidden)]
71
        public ActionResult<AnnotationListResponse> GetUserAnnotations(Guid userId)
72
        {
73
            var res = annotationService.GetUserAnnotations(userId);
74
            return Ok(res);
75
        }
66 76
    }
67 77
}

Také k dispozici: Unified diff