implemented auth repository and service in dart (JWT)
This commit is contained in:
@@ -28,7 +28,7 @@ func main() {
|
||||
projectRepo := repository.NewProjectRepository(database.Projects())
|
||||
projectTaskRepo := repository.NewProjectTaskRepository(database.ProjectTasks())
|
||||
timeEntryRepo := repository.NewTimeEntryRepository(database.TimeEntries())
|
||||
authRepo := repository.NewInMemoryAuthRepository("secret")
|
||||
authRepo := repository.NewInMemoryAuthRepositoryImpl("secret")
|
||||
|
||||
// Initialize services
|
||||
userService := services.NewUserService(userRepo)
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ type InMemoryAuthRepository struct {
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
func NewInMemoryAuthRepository(secretKey string) repository.AuthRepository {
|
||||
func NewInMemoryAuthRepositoryImpl(secretKey string) repository.AuthRepository {
|
||||
return &InMemoryAuthRepository{
|
||||
secretKey: secretKey,
|
||||
sessionCache: make(map[string]string),
|
||||
Reference in New Issue
Block a user