very basic auth

- user is requested to login when trying to access content
This commit is contained in:
2025-09-10 21:02:19 +01:00
parent 167f138647
commit dc72c5414e
34 changed files with 349 additions and 79 deletions
+10
View File
@@ -5,6 +5,16 @@ import (
mod "expenses/expenses/models"
)
func (a *ExpensesApp) GetUser(id int32) (*mod.User, error) {
ctx := context.Background()
return a.UserRepo.Get(ctx, id)
}
func (a *ExpensesApp) GetUserByName(name string) (*mod.User, error) {
ctx := context.Background()
return a.UserRepo.GetByName(ctx, name)
}
func (a *ExpensesApp) GetAllUsers() ([]mod.User, error) {
ctx := context.Background()
return a.UserRepo.GetAll(ctx)