Fixes filter application (#992)
* Fixes filter application # Fixed: - Fixed: Fixed an issue where pagination would not reset on filter application (develop) * Fixing up code * code fixes * When no user exists for an api key in Plugin controller, throw 401. * Cleaned up the code to remove the extra variable and make use of what we had already. * Fixed the broken build from last PR * Fixed a few places the code didn't get updated Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
This commit is contained in:
parent
480cd94ab5
commit
ea9f59320e
9 changed files with 35 additions and 50 deletions
|
|
@ -32,6 +32,7 @@ namespace API.Controllers
|
|||
// NOTE: In order to log information about plugins, we need some Plugin Description information for each request
|
||||
// Should log into access table so we can tell the user
|
||||
var userId = await _unitOfWork.UserRepository.GetUserIdByApiKeyAsync(apiKey);
|
||||
if (userId <= 0) return Unauthorized();
|
||||
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(userId);
|
||||
_logger.LogInformation("Plugin {PluginName} has authenticated with {UserName} ({UserId})'s API Key", pluginName, user.UserName, userId);
|
||||
return new UserDto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue