mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Work on the requests page mostly done.
This commit is contained in:
parent
70362b908f
commit
98d143c9b2
17 changed files with 297 additions and 78 deletions
|
@ -27,8 +27,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Mono.Data.Sqlite;
|
||||
|
||||
using Nancy;
|
||||
using Nancy.Authentication.Forms;
|
||||
using Nancy.Security;
|
||||
|
@ -63,7 +61,6 @@ namespace RequestPlex.Core
|
|||
|
||||
public static Guid? ValidateUser(string username, string password)
|
||||
{
|
||||
var db = new DbConfiguration(new SqliteFactory());
|
||||
var repo = new UserRepository<UserModel>(Db);
|
||||
var users = repo.GetAll();
|
||||
var userRecord = users.FirstOrDefault(u => u.UserName.Equals(username, StringComparison.InvariantCultureIgnoreCase) && u.Password.Equals(password)); // TODO hashing
|
||||
|
@ -78,7 +75,6 @@ namespace RequestPlex.Core
|
|||
|
||||
public static bool DoUsersExist()
|
||||
{
|
||||
var db = new DbConfiguration(new SqliteFactory());
|
||||
var repo = new UserRepository<UserModel>(Db);
|
||||
var users = repo.GetAll();
|
||||
return users.Any();
|
||||
|
@ -86,7 +82,6 @@ namespace RequestPlex.Core
|
|||
|
||||
public static Guid? CreateUser(string username, string password)
|
||||
{
|
||||
var db = new DbConfiguration(new SqliteFactory());
|
||||
var repo = new UserRepository<UserModel>(Db);
|
||||
|
||||
var userModel = new UserModel { UserName = username, User = Guid.NewGuid().ToString(), Password = password };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue