forked from ddrilling/AsbCloudServer
Фикс контроллеров
This commit is contained in:
parent
5d4805dd22
commit
20aad0eb11
@ -1,6 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data.Manuals;
|
||||
using AsbCloudApp.Repositories;
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
@ -101,7 +103,7 @@ public class ManualController : ControllerBase
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(int), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(IEnumerable<CatalogItemManualDto>), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
public async Task<IActionResult> GetCatalogAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ public class ManualFolderController : ControllerBase
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
if (!CanUserAccess())
|
||||
Forbid();
|
||||
return Forbid();
|
||||
|
||||
return Ok(await manualCatalogService.AddFolderAsync(name, idParent, idCategory, cancellationToken));
|
||||
}
|
||||
@ -60,7 +60,7 @@ public class ManualFolderController : ControllerBase
|
||||
public async Task<IActionResult> UpdateFolderAsync(int id, string name, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!CanUserAccess())
|
||||
Forbid();
|
||||
return Forbid();
|
||||
|
||||
await manualCatalogService.UpdateFolderAsync(id, name, cancellationToken);
|
||||
|
||||
@ -80,7 +80,7 @@ public class ManualFolderController : ControllerBase
|
||||
public async Task<IActionResult> DeleteFolderAsync(int id, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!CanUserAccess())
|
||||
Forbid();
|
||||
return Forbid();
|
||||
|
||||
return Ok(await manualCatalogService.DeleteFolderAsync(id, cancellationToken));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user