1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

added expiration date and creator identifier to the Send access response model (#1166)

This commit is contained in:
Addison Beck
2021-02-25 17:04:53 -05:00
committed by GitHub
parent 2f7c2a64e0
commit b21c9042ca
2 changed files with 10 additions and 1 deletions

View File

@ -60,7 +60,12 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
return new ObjectResult(new SendAccessResponseModel(send, _globalSettings));
var sendResponse = new SendAccessResponseModel(send, _globalSettings);
if (send.UserId.HasValue) {
var creator = await _userService.GetUserByIdAsync(send.UserId.Value);
sendResponse.CreatorIdentifier = creator.Email;
}
return new ObjectResult(sendResponse);
}
[AllowAnonymous]