update auth.go, database.go, docs.go, forum.go, go.mod, go.sum, main.go, post_schema.go, role.go, server.go, service.go, swagger.json, swagger.yaml, thread_schema.go

This commit is contained in:
redtea committed 2024-10-21 12:00:00 +03:00
1 parent 42c7f5795d
commit 43505548f7
14 files changed
+855

No files matched your search

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