feat: add support for custom error messages in auth middleware
This commit is contained in:
@@ -51,3 +51,13 @@ jobs:
|
||||
run: |
|
||||
docker login -u ${{ secrets.DOCKER_AF_USERNAME }} -p ${{ secrets.DOCKER_AF_PASSWORD }} docker-af.hub.ipao.vip
|
||||
docker build -f Dockerfile --push -t docker-af.hub.ipao.vip/rogeecn/quyun:latest .
|
||||
|
||||
- name: Send Message To Gotify
|
||||
run: |
|
||||
curl -X POST "https://gotify.jdwan.com/message?token=${{ secrets.GOTIFY_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"title": "GITEA Build: quyun ",
|
||||
"message": "quyun Build Success",
|
||||
"priority": 5
|
||||
}'
|
||||
|
||||
@@ -54,7 +54,7 @@ func (f *Middlewares) Auth(ctx fiber.Ctx) error {
|
||||
return ctx.Redirect().To(fullUrl)
|
||||
}
|
||||
|
||||
user, err = models.Users.GetByID(ctx.Context(), jwt.UserID)
|
||||
user, err := models.Users.GetByID(ctx.Context(), jwt.UserID)
|
||||
if err != nil {
|
||||
// remove cookie
|
||||
ctx.ClearCookie("token")
|
||||
|
||||
Reference in New Issue
Block a user