update authorized.go, database.go, middleware.go, project.go, response.go, role.go, service.go

This commit is contained in:
redtea committed 2024-10-20 12:00:00 +03:00
1 parent 53257427c9
commit b6133df436
7 files changed
+226

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package service
import (
"esproject"
)
type Authorization interface {
Authorize(header string) (*esproject.AuthorizedUser, error)
AuthorizeById(id int64) (*esproject.AuthorizedUser, error)
AuthorizeAndUpdatePicture(header string, picUrl string) (*esproject.AuthorizedUser, error)
}
type Service struct {
Authorization
}
func NewService() *Service {
return &Service{
Authorization: NewAuthService(),
}
}