add basic structure of backend
This commit is contained in:
11
auth/handlers.go
Normal file
11
auth/handlers.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func AuthHandler(c *fiber.Ctx) error {
|
||||
return errors.New("not implemented")
|
||||
}
|
||||
7
auth/models.go
Normal file
7
auth/models.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package auth
|
||||
|
||||
type AuthRequest struct {
|
||||
AccountHash string `json:"accountHash" validate:"required"`
|
||||
TelegramId int32 `json:"telegramId" validate:"required"`
|
||||
InitData string `json:"initData" validate:"required"`
|
||||
}
|
||||
10
auth/routes.go
Normal file
10
auth/routes.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func SetupRoutes(app fiber.Router) fiber.Router {
|
||||
app.Post("/", AuthHandler)
|
||||
return app
|
||||
}
|
||||
Reference in New Issue
Block a user