mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
upgraded migrations and context usage
This commit is contained in:
@@ -22,12 +22,14 @@ func NewApiController(as *services.ApiService, s *gin.RouterGroup) *ApiControlle
|
||||
}
|
||||
|
||||
func (ac *ApiController) getFirst(c *gin.Context) {
|
||||
apiModel := ac.ApiService.GetFirst()
|
||||
apiModel := ac.ApiService.GetFirst(c)
|
||||
c.JSON(200, apiModel)
|
||||
}
|
||||
|
||||
func (ac *ApiController) postMigrate(c *gin.Context) {
|
||||
mr, er := ac.ApiService.PostMigrate()
|
||||
migrateModel := c.MustGet("migrate")
|
||||
version := migrateModel.(middleware.SecretCodeModel).Version
|
||||
mr, er := ac.ApiService.PostMigrate(c, version)
|
||||
|
||||
if er.Message != "" {
|
||||
c.JSON(er.StatusCode, er)
|
||||
|
||||
Reference in New Issue
Block a user