very basic auth
- user is requested to login when trying to access content
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user