- 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
|
@ -279,7 +279,7 @@ func (h *Handler) DeleteThing(c *gin.Context) {
|
|||
}
|
||||
func Routes(r *gin.Engine, h *Handler, auth *jwt.GinJWTMiddleware) {
|
||||
|
||||
thingRoutes := r.Group("things")
|
||||
thingRoutes := r.Group("api/v1/things")
|
||||
thingRoutes.Use(auth.MiddlewareFunc())
|
||||
{
|
||||
thingRoutes.POST("", h.CreateThing)
|
||||
|
|
|
@ -164,7 +164,7 @@ func validateUserAndThing(c *gin.Context, h *Webhook) (*tModel.Thing, bool) {
|
|||
|
||||
func Webhooks(cfg *config.Config, w *Webhook, r *gin.Engine, auth *jwt.GinJWTMiddleware) {
|
||||
|
||||
thingsAPI := r.Group("webhooks/things")
|
||||
thingsAPI := r.Group("eapi/v1/things")
|
||||
|
||||
thingsAPI.Use(utils.TimeoutMiddleware(cfg.Server.WriteTimeout))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue