diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-11 08:53:16 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-11 08:53:16 -0500 |
| commit | b56a6650e95b3964d22d0af8c4c44b74d2800c29 (patch) | |
| tree | b325530d3897131c1592183c2ba9b325d1b19925 /src/slskd/Search/API/Controllers | |
| parent | 3c3cfe6f2c3c49c05aa4de1e86a81fcb2c8af590 (diff) | |
| parent | 409f66e9a851625346fb1309f6cd41e6a9770e9c (diff) | |
| download | slskd-b56a6650e95b3964d22d0af8c4c44b74d2800c29.tar.gz | |
Merge remote-tracking branch 'origin/master' into agent
Diffstat (limited to 'src/slskd/Search/API/Controllers')
| -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) |
