mirror of
https://github.com/bitwarden/server.git
synced 2025-02-02 23:41:21 +01:00
return CipherResponseModel from attachment post
This commit is contained in:
parent
e932f3a00a
commit
955755831c
@ -224,7 +224,7 @@ namespace Bit.Api.Controllers
|
|||||||
|
|
||||||
[HttpPost("{id}/attachment")]
|
[HttpPost("{id}/attachment")]
|
||||||
[DisableFormValueModelBinding]
|
[DisableFormValueModelBinding]
|
||||||
public async Task PostAttachment(string id)
|
public async Task<CipherResponseModel> PostAttachment(string id)
|
||||||
{
|
{
|
||||||
ValidateAttachment();
|
ValidateAttachment();
|
||||||
|
|
||||||
@ -241,6 +241,8 @@ namespace Bit.Api.Controllers
|
|||||||
await _cipherService.CreateAttachmentAsync(cipher, stream, fileName,
|
await _cipherService.CreateAttachmentAsync(cipher, stream, fileName,
|
||||||
Request.ContentLength.GetValueOrDefault(0), userId);
|
Request.ContentLength.GetValueOrDefault(0), userId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return new CipherResponseModel(cipher, _globalSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("{id}/attachment/{attachmentId}/share")]
|
[HttpPost("{id}/attachment/{attachmentId}/share")]
|
||||||
|
Loading…
Reference in New Issue
Block a user