Added some more logging and documented deploy procedures
This commit is contained in:
parent
c9871c817a
commit
9dcaa1ad39
|
@ -22,6 +22,10 @@ The account field "role" is a bit special, in that if it contains "admin" as one
|
|||
|
||||
Run integration tests (Requires migrated database and started API): `docker-compose run --rm tests`
|
||||
|
||||
## Deploy a new version
|
||||
|
||||
Everytime a push is done, tests are ran on [Drone](https://drone.larvit.se/pwrpln/auth-api). To deploy a new version to [Dockerhub](https://hub.docker.com/repository/docker/lilleman/auth-api), create a new tag (USE SEMVER!!!).
|
||||
|
||||
## Some useful cURLs
|
||||
|
||||
Obtain an admin GWT: `curl -d '"api-key-goes-here"' -H "Content-Type: application/json" -i http://localhost:4000/auth/api-key`
|
||||
|
|
|
@ -143,6 +143,8 @@ func (h Handlers) AccountAuthPassword(c *fiber.Ctx) error {
|
|||
if err != nil {
|
||||
if err.Error() == "no rows in result set" {
|
||||
return c.Status(403).JSON([]ResJSONError{{Error: "Invalid name or password"}})
|
||||
} else {
|
||||
h.Log.Error("unknown error when resolving account", "err", err.Error())
|
||||
}
|
||||
|
||||
return c.Status(500).JSON([]ResJSONError{{Error: err.Error()}})
|
||||
|
|
Loading…
Reference in New Issue
Block a user