Go-JWT-Postgres-Mysql-Restful-API
Go-JWT-Postgres-Mysql-Restful-API copied to clipboard
This is an API built with golang, jwt, gorm, postgresql, mysql
I moved Server Struc to config/config.go but it does not work Unresolved type 'Server'
`We are getting the env values panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xb0 pc=0x434d526] goroutine 1 [running]: github.com/jinzhu/gorm.(*DB).clone(0x0, 0x0) /Users/go/src/github.com/jinzhu/gorm/main.go:856 +0x26...
https://github.com/victorsteven/Go-JWT-Postgres-Mysql-Restful-API/blob/df87a725e7ea51d4400f243121e96ac30bbea90f/tests/controllertests/post_controller_test.go#L168 Can errorMessage be omitted from the TestGetPostByID Method? Its not used anywhere else other than the struct.
I see you import "github.com/jinzhu/gorm" and not gorm.io/gorm It is the same ? Thanks
I think it would be better practice in _login_controller.go_ to only issue a bearer token after **explicitely** checking that the user-provided password matches the hash after using bcrypt. In its...