69123d53a9
Now you can access a user __public__ profile by querying the api endpoint /profile?id=USERID
21 lignes
623 o
Go
21 lignes
623 o
Go
package apiController
|
|
|
|
import "github.com/NyaaPantsu/nyaa/controllers/router"
|
|
|
|
func init() {
|
|
api := router.Get().Group("/api")
|
|
{
|
|
api.GET("", APIHandler)
|
|
api.GET("/p/:page", APIHandler)
|
|
api.GET("/view/:id", APIViewHandler)
|
|
api.HEAD("/view/:id", APIViewHeadHandler)
|
|
api.POST("/upload", APIUploadHandler)
|
|
api.POST("/login", APILoginHandler)
|
|
api.GET("/profile", APIProfileHandler)
|
|
api.GET("/token/check", APICheckTokenHandler)
|
|
api.GET("/token/refresh", APIRefreshTokenHandler)
|
|
api.Any("/search", APISearchHandler)
|
|
api.Any("/search/p/:page", APISearchHandler)
|
|
api.PUT("/update", APIUpdateHandler)
|
|
}
|
|
}
|