1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Removed unneeded config passthrough

This commit is contained in:
Uncled1023 2017-01-18 23:02:17 -08:00
parent b3b0277582
commit a40b5804fb
2 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ namespace Teknik.Areas.API.Controllers
// Associate this with the user if they provided an auth key
if (!string.IsNullOrEmpty(model.authToken))
{
User foundUser = UserHelper.GetUserFromToken(db, Config, model.authToken);
User foundUser = UserHelper.GetUserFromToken(db, model.authToken);
if (foundUser != null)
{
upload.UserId = foundUser.UserId;
@ -186,7 +186,7 @@ namespace Teknik.Areas.API.Controllers
// Associate this with the user if they provided an auth key
if (!string.IsNullOrEmpty(model.authToken))
{
User foundUser = UserHelper.GetUserFromToken(db, Config, model.authToken);
User foundUser = UserHelper.GetUserFromToken(db, model.authToken);
if (foundUser != null)
{
paste.UserId = foundUser.UserId;
@ -231,7 +231,7 @@ namespace Teknik.Areas.API.Controllers
// Associate this with the user if they provided an auth key
if (!string.IsNullOrEmpty(model.authToken))
{
User foundUser = UserHelper.GetUserFromToken(db, Config, model.authToken);
User foundUser = UserHelper.GetUserFromToken(db, model.authToken);
if (foundUser != null)
{
newUrl.UserId = foundUser.UserId;

View File

@ -228,7 +228,7 @@ namespace Teknik.Areas.Users.Utility
return user;
}
public static User GetUserFromToken(TeknikEntities db, Config config, string token)
public static User GetUserFromToken(TeknikEntities db, string token)
{
string hashedToken = SHA256.Hash(token);
User foundUser = db.Users.FirstOrDefault(u => u.AuthTokens.Select(a => a.HashedToken).Contains(hashedToken));