@ -6,12 +6,13 @@ COPY *.go ./
|
||||
COPY *.mod ./
|
||||
COPY *.sum ./
|
||||
COPY Makefile ./
|
||||
COPY config ./config
|
||||
COPY database ./database
|
||||
COPY routes ./routes
|
||||
COPY sql ./sql
|
||||
COPY status ./status
|
||||
COPY util ./util
|
||||
COPY views ./views
|
||||
COPY routes ./routes
|
||||
COPY config ./config
|
||||
COPY status ./status
|
||||
COPY database ./database
|
||||
|
||||
EXPOSE 7001
|
||||
RUN make
|
||||
|
@ -6,7 +6,7 @@ api.elf: $(GOSRCS)
|
||||
go build -o $@
|
||||
|
||||
run:
|
||||
API_DEBUG=true API_APP_URL=http://localhost:5173/ API_PASSWORD=test ./api.elf
|
||||
API_DEBUG=true API_APP_URL=http://localhost:7002 API_PASSWORD=test ./api.elf
|
||||
|
||||
format:
|
||||
gofmt -s -w .
|
||||
|
@ -66,7 +66,7 @@ func GET_Metrics(c *fiber.Ctx) error {
|
||||
if result["since"] == 0 {
|
||||
result["since"] = uint64(time.Now().Truncate(24 * time.Hour).Unix())
|
||||
|
||||
if err = db.MetricsSet("since", result["since"]); err != nil {
|
||||
if err = db.MetricsSet("start_date", result["since"]); err != nil {
|
||||
return util.ErrInternal(c, err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user