- Update API routes for consistency and versioning. any communication with donetick will go through /api/v1
. for external will user prefix /eapi/v1
- Update Readme and add Discord and Reddit
This commit is contained in:
parent
776e510c0c
commit
b7b434ae8c
8 changed files with 26 additions and 10 deletions
|
@ -586,7 +586,7 @@ func (h *Handler) updateUserPasswordLoggedInOnly(c *gin.Context) {
|
|||
|
||||
func Routes(router *gin.Engine, h *Handler, auth *jwt.GinJWTMiddleware, limiter *limiter.Limiter) {
|
||||
|
||||
userRoutes := router.Group("users")
|
||||
userRoutes := router.Group("api/v1/users")
|
||||
userRoutes.Use(auth.MiddlewareFunc(), utils.RateLimitMiddleware(limiter))
|
||||
{
|
||||
userRoutes.GET("/", h.GetAllUsers())
|
||||
|
@ -600,7 +600,7 @@ func Routes(router *gin.Engine, h *Handler, auth *jwt.GinJWTMiddleware, limiter
|
|||
|
||||
}
|
||||
|
||||
authRoutes := router.Group("auth")
|
||||
authRoutes := router.Group("api/v1/auth")
|
||||
authRoutes.Use(utils.RateLimitMiddleware(limiter))
|
||||
{
|
||||
authRoutes.POST("/:provider/callback", h.thirdPartyAuthCallback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue