aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Search/API/Controllers/SearchesController.cs
diff options
context:
space:
mode:
authorSanskar Pandey <sanskarpandey0@gmail.com>2022-10-07 04:05:06 +0530
committerGitHub <noreply@github.com>2022-10-07 04:05:06 +0530
commit9fc05648a75b1c8022e3f034ff2abca47cdeaaf2 (patch)
treee684ac785f9458fae25c219f44eb03031984d9f4 /src/slskd/Search/API/Controllers/SearchesController.cs
parent94d2536da26287e696662c82295c2fdc832ec856 (diff)
parentfb6350e107bd5f850a13c8c2065e341241967ab2 (diff)
downloadslskd-9fc05648a75b1c8022e3f034ff2abca47cdeaaf2.tar.gz
Merge branch 'master' into mutex-implementation
Diffstat (limited to 'src/slskd/Search/API/Controllers/SearchesController.cs')
-rw-r--r--src/slskd/Search/API/Controllers/SearchesController.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/slskd/Search/API/Controllers/SearchesController.cs b/src/slskd/Search/API/Controllers/SearchesController.cs
index acae18e0..aadf01b2 100644
--- a/src/slskd/Search/API/Controllers/SearchesController.cs
+++ b/src/slskd/Search/API/Controllers/SearchesController.cs
@@ -54,7 +54,7 @@ namespace slskd.Search.API
/// <response code="400">The specified <paramref name="request"/> was malformed.</response>
/// <response code="500">The search terminated abnormally.</response>
[HttpPost("")]
- [Authorize]
+ [Authorize(Policy = AuthPolicy.Any)]
public async Task<IActionResult> Post([FromBody] SearchRequest request)
{
if (string.IsNullOrWhiteSpace(request.SearchText))
@@ -91,7 +91,7 @@ namespace slskd.Search.API
/// <response code="200">The request completed successfully.</response>
/// <response code="404">A matching search was not found.</response>
[HttpGet("{id}")]
- [Authorize]
+ [Authorize(Policy = AuthPolicy.Any)]
public async Task<IActionResult> GetById([FromRoute] Guid id, [FromQuery] bool includeResponses = false)
{
var search = await Searches.FindAsync(search => search.Id == id, includeResponses);
@@ -112,7 +112,7 @@ namespace slskd.Search.API
/// <response code="200">The request completed successfully.</response>
/// <response code="404">A matching search was not found.</response>
[HttpGet("{id}/responses")]
- [Authorize]
+ [Authorize(Policy = AuthPolicy.Any)]
public async Task<IActionResult> GetResponsesById([FromRoute] Guid id)
{
var search = await Searches.FindAsync(search => search.Id == id, includeResponses: true);
@@ -130,7 +130,7 @@ namespace slskd.Search.API
/// </summary>
/// <returns></returns>
[HttpGet("")]
- [Authorize]
+ [Authorize(Policy = AuthPolicy.Any)]
public async Task<IActionResult> GetAll()
{
var searches = await Searches.ListAsync();
@@ -145,7 +145,7 @@ namespace slskd.Search.API
/// <response code="304">The search was not in progress.</response>
/// <returns></returns>
[HttpPut("{id}")]
- [Authorize]
+ [Authorize(Policy = AuthPolicy.Any)]
[ProducesResponseType(200)]
[ProducesResponseType(304)]
public async Task<IActionResult> Cancel([FromRoute] Guid id)
@@ -173,7 +173,7 @@ namespace slskd.Search.API
/// <response code="404">A search with the specified id could not be found.</response>
/// <returns></returns>
[HttpDelete("{id}")]
- [Authorize]
+ [Authorize(Policy = AuthPolicy.Any)]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public async Task<IActionResult> Delete([FromRoute] Guid id)