Added little note to post / comment form, added some other stuff, which I forgot

This commit is contained in:
limited_dev 2023-01-27 22:09:16 +01:00
parent bdb2d0a0b5
commit c04b9ac6f2
8 changed files with 105 additions and 20 deletions

View file

@ -15,6 +15,12 @@ public static class UsersRepository
await using var db = new AppDBContext();
return await db.Users.FirstOrDefaultAsync(user => user.UserID == userId);
}
public static async Task<UserData> getUserByIPAsync(string userIp)
{
await using var db = new AppDBContext();
return await db.Users.FirstOrDefaultAsync(user => user.Ipv4Address == userIp);
}
public static async Task<int> createUserAsync(UserData userToCreate)
{