diff options
| author | Sanskar Pandey <sanskarpandey0@gmail.com> | 2022-10-10 15:00:03 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-10 15:00:03 +0530 |
| commit | 9c84200a25ee590e30b5e10d5b9a648ae105730e (patch) | |
| tree | aec47cc2bf04ae5ba47be6f6071aaa7c4eef1e6f /src/slskd/Search/API/Controllers/SearchesController.cs | |
| parent | 56bfdfc22b7a2cb9f7270f83498548f93ab4a04e (diff) | |
| parent | 7c00e16196cb4e21467e6f94f9098de9e48a1219 (diff) | |
| download | slskd-9c84200a25ee590e30b5e10d5b9a648ae105730e.tar.gz | |
Merge branch 'master' into contentPath-relative-path
Diffstat (limited to 'src/slskd/Search/API/Controllers/SearchesController.cs')
| -rw-r--r-- | src/slskd/Search/API/Controllers/SearchesController.cs | 12 |
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) |
