add remaining scope repo methods.
This commit is contained in:
+2
-2
@@ -8,11 +8,11 @@ import (
|
||||
)
|
||||
|
||||
func Scopes(g *gin.RouterGroup, db database.Database) {
|
||||
g.GET("/", handler("goals", func(c *gin.Context) (interface{}, error) {
|
||||
g.GET("/", handler("scopes", func(c *gin.Context) (interface{}, error) {
|
||||
return db.Scopes().ListByUser(c.Request.Context(), auth.UserID(c))
|
||||
}))
|
||||
|
||||
g.GET("/:id", handler("goals", func(c *gin.Context) (interface{}, error) {
|
||||
g.GET("/:id", handler("scope", func(c *gin.Context) (interface{}, error) {
|
||||
id, err := reqInt(c, "id")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user