Skip to content
Snippets Groups Projects
Commit 87148368 authored by L. Ellenbeck's avatar L. Ellenbeck
Browse files

WIP: fixed get token coscine/issues#1125

parent 26f9ec1a
No related branches found
No related tags found
1 merge request!100New: Add ApiToken Database Model
......@@ -11,6 +11,6 @@ using System.Reflection;
[assembly: AssemblyProduct("Database.T4")]
[assembly: AssemblyVersion("1.26.0")]
[assembly: AssemblyFileVersion("1.26.0")]
[assembly: AssemblyInformationalVersion("1.26.0-topic-1125-apito0003")]
[assembly: AssemblyInformationalVersion("1.26.0-topic-1125-apito0004")]
[assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")]
......@@ -11,6 +11,6 @@ using System.Reflection;
[assembly: AssemblyProduct("Database.Tests")]
[assembly: AssemblyVersion("1.26.0")]
[assembly: AssemblyFileVersion("1.26.0")]
[assembly: AssemblyInformationalVersion("1.26.0-topic-1125-apito0003")]
[assembly: AssemblyInformationalVersion("1.26.0-topic-1125-apito0004")]
[assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")]
......@@ -44,7 +44,12 @@ namespace Coscine.Database.Models
public ApiTokenObject GetToken(string userId, string token)
{
var t = GetWhere(x => x.UserId.ToString() == userId && x.Token.ToLower() == token.ToLower());
return GetToken(new Guid(userId), token);
}
public ApiTokenObject GetToken(Guid userId, string token)
{
var t = GetWhere(x => x.UserId == userId && x.Token.ToLower() == token.ToLower());
if (t == null)
{
return null;
......
......@@ -11,6 +11,6 @@ using System.Reflection;
[assembly: AssemblyProduct("Database")]
[assembly: AssemblyVersion("1.26.0")]
[assembly: AssemblyFileVersion("1.26.0")]
[assembly: AssemblyInformationalVersion("1.26.0-topic-1125-apito0003")]
[assembly: AssemblyInformationalVersion("1.26.0-topic-1125-apito0004")]
[assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment