mirror of
https://github.com/bitwarden/server.git
synced 2025-04-16 18:48:16 -05:00
collection update model
This commit is contained in:
parent
62503068c6
commit
14ee85eea2
@ -84,7 +84,7 @@ namespace Bit.Api.Public.Controllers
|
|||||||
[ProducesResponseType(typeof(CollectionResponseModel), (int)HttpStatusCode.OK)]
|
[ProducesResponseType(typeof(CollectionResponseModel), (int)HttpStatusCode.OK)]
|
||||||
[ProducesResponseType(typeof(ErrorResponseModel), (int)HttpStatusCode.BadRequest)]
|
[ProducesResponseType(typeof(ErrorResponseModel), (int)HttpStatusCode.BadRequest)]
|
||||||
[ProducesResponseType((int)HttpStatusCode.NotFound)]
|
[ProducesResponseType((int)HttpStatusCode.NotFound)]
|
||||||
public async Task<IActionResult> Put(Guid id, [FromBody]CollectionCreateUpdateRequestModel model)
|
public async Task<IActionResult> Put(Guid id, [FromBody]CollectionUpdateRequestModel model)
|
||||||
{
|
{
|
||||||
var existingCollection = await _collectionRepository.GetByIdAsync(id);
|
var existingCollection = await _collectionRepository.GetByIdAsync(id);
|
||||||
if(existingCollection == null || existingCollection.OrganizationId != _currentContext.OrganizationId)
|
if(existingCollection == null || existingCollection.OrganizationId != _currentContext.OrganizationId)
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Bit.Core.Models.Table;
|
using Bit.Core.Models.Table;
|
||||||
|
|
||||||
namespace Bit.Core.Models.Api.Public
|
namespace Bit.Core.Models.Api.Public
|
||||||
{
|
{
|
||||||
public class CollectionCreateUpdateRequestModel : GroupBaseModel
|
public class CollectionUpdateRequestModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The associated groups that this collection is assigned to.
|
/// The associated groups that this collection is assigned to.
|
Loading…
x
Reference in New Issue
Block a user