Refactoring part 1: Fix some annoying linter warnings in API code (#1064)

* names, constants of reusable strings, removed unneeded `if`, replaced deprecated imports

* more deprecated imports replaced

* What is this?))

* Fix a path and quote a var in Dockerfile

* Addressing review comments

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
This commit is contained in:
Kostiantyn
2024-09-30 15:45:02 +03:00
committed by GitHub
parent 70a3944e21
commit d1193c5ca4
38 changed files with 334 additions and 309 deletions

View File

@@ -25,7 +25,7 @@ ENV REACT_APP_BUILD_COMMIT_SHA=${COMMIT_SHA:-}
WORKDIR /app/ui
COPY ui/package.json ui/package-lock.json /app/ui
COPY ui/package.json ui/package-lock.json /app/ui/
RUN npm ci
COPY ui/ /app/ui
@@ -33,7 +33,7 @@ RUN if [ "${BUILD_DATE}" = "undefined" ]; then \
export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ'); \
export REACT_APP_BUILD_DATE=${BUILD_DATE}; \
fi; \
npm run build -- --base=$UI_PUBLIC_URL
npm run build -- --base="${UI_PUBLIC_URL}"
### Build API ###
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23-bookworm AS api