Init: setup uptrace and swagger
This commit is contained in:
27
handlers/api/getImages.go
Normal file
27
handlers/api/getImages.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"gitea.konchin.com/go2025/backend/utils"
|
||||
"github.com/uptrace/bunrouter"
|
||||
)
|
||||
|
||||
type getImagesOutputImage struct {
|
||||
Id int64 `json:"id"`
|
||||
Uploader string `json:"uploaded_user_id"`
|
||||
UploadTS int64 `json:"uploaded_at"`
|
||||
Aliases []string `json:"aliases"`
|
||||
}
|
||||
|
||||
// GetImages
|
||||
//
|
||||
// @success 200 {object} getImagesOutputImage
|
||||
// @failure 400
|
||||
// @failure 401
|
||||
// @router /api/images [get]
|
||||
func (self *Handlers) GetImages(
|
||||
w http.ResponseWriter, req bunrouter.Request,
|
||||
) error {
|
||||
return utils.Success(w)
|
||||
}
|
||||
8
handlers/api/handlers.go
Normal file
8
handlers/api/handlers.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package api
|
||||
|
||||
type Handlers struct {
|
||||
}
|
||||
|
||||
func NewHandlers() *Handlers {
|
||||
return &Handlers{}
|
||||
}
|
||||
Reference in New Issue
Block a user