feat: add database connections, initial migration and early CLI tooling
All checks were successful
Update changelog / changelog (push) Successful in 25s
All checks were successful
Update changelog / changelog (push) Successful in 25s
This commit is contained in:
30
Controllers/GeneralUseHelperFunctions.cs
Normal file
30
Controllers/GeneralUseHelperFunctions.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Shadow.Data;
|
||||
using Shadow.Entities;
|
||||
using System.Text;
|
||||
|
||||
namespace Shadow.Controllers;
|
||||
|
||||
public class GeneralUseHelpers(ApplicationDbContext db, IConfiguration appsettings)
|
||||
{
|
||||
private readonly ApplicationDbContext _db = db;
|
||||
private readonly IConfiguration _appsettings = appsettings;
|
||||
|
||||
|
||||
//async public Task<User?> GetUserFromEmail(string email)
|
||||
//{
|
||||
// return await _db.Users.FirstOrDefaultAsync(e => e.Email == email);
|
||||
//}
|
||||
|
||||
//public string HashWithSHA512(string s)
|
||||
//{
|
||||
// using (var sha512 = SHA512.Create())
|
||||
// {
|
||||
// byte[] bytes = Encoding.ASCII.GetBytes(s);
|
||||
// byte[] hash = sha512.ComputeHash(bytes);
|
||||
// string hashstring = BitConverter.ToString(hash).Replace("-", "").ToLower();
|
||||
// return hashstring;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user