Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null reports value #408

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM alpine:latest

LABEL maintainer="Leigh MacDonald <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/leighmacdonald/gbans"
LABEL org.opencontainers.image.version="v0.5.1"
LABEL org.opencontainers.image.version="v0.5.2"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.description="Centralized community backend for Team Fortress 2"

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all test clean build install frontend sourcemod
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
TAGGED_IMAGE = ghcr.io/leighmacdonald/gbans:$(BRANCH)
VERSION=v0.5.1
VERSION=v0.5.2
GO_CMD=go
GO_BUILD=$(GO_CMD) build
GO_FLAGS = -trimpath -ldflags="-s -w -X github.com/leighmacdonald/gbans/internal/app.BuildVersion=$(VERSION)"
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sudo docker run -d --restart unless-stopped \
--dns=1.1.1.1 \
-v /home/ubuntu/gbans/gbans.yml:/app/gbans.yml:ro \
--name gbans \
ghcr.io/leighmacdonald/gbans:v0.5.1
ghcr.io/leighmacdonald/gbans:v0.5.2
```

Substitute `master` for a specific tag if desired, and `/home/ubuntu/gbans/gbans.yml` with the location of your config.
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gbans",
"version": "0.5.1",
"version": "0.5.2",
"description": "gbans",
"main": "src/index.tsx",
"repository": "github.com/leighmacdonald/gbans",
Expand Down
4 changes: 4 additions & 0 deletions internal/app/http_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,10 @@ func onAPIGetReports(app *App) gin.HandlerFunc {
})
}

if userReports == nil {
userReports = []reportWithAuthor{}
}

ctx.JSON(http.StatusOK, LazyResult{
Count: count,
Data: userReports,
Expand Down