secret code middleware for migration

This commit is contained in:
Fran Jurmanović
2021-05-25 21:47:53 +02:00
parent 8a9759f66e
commit a04b786538
3 changed files with 35 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ func NewApiController(as *services.ApiService, s *gin.RouterGroup) *ApiControlle
ac.ApiService = as
s.GET("", ac.getFirst)
s.POST("migrate", middleware.Auth, ac.postMigrate)
s.POST("migrate", middleware.SecretCode, ac.postMigrate)
return ac
}