예제 #1
0
        public async Task <IActionResult> AddAdmin([FromRoute] string albumId, [FromRoute] string adminEmail)
        {
            var requestor = await GetUser();

            var admin = await GetUserByEmail(adminEmail);

            if (await _albumService.AddAdmin(albumId, admin, requestor))
            {
                return(StatusCode(StatusCodes.Status201Created));
            }
            return(BadRequest());
        }