fix(analyticsApi): only iso 8601 date format
Build and Push Docker image / build-and-push (push) Successful in 2m14s
Details
Build and Push Docker image / build-and-push (push) Successful in 2m14s
Details
This commit is contained in:
parent
e32dbbfa0d
commit
54389e9169
|
@ -45,7 +45,7 @@ import (
|
||||||
// "count": <total view count since startDate>,
|
// "count": <total view count since startDate>,
|
||||||
// "last_30_days_data": [
|
// "last_30_days_data": [
|
||||||
// {
|
// {
|
||||||
// "date": "YYYY-MM-DDTHH:MM:SSZ",
|
// "date": <ISO 8601>,
|
||||||
// "count": <daily count>
|
// "count": <daily count>
|
||||||
// },
|
// },
|
||||||
// ...
|
// ...
|
||||||
|
@ -104,7 +104,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
|
||||||
WHERE created >= {:startDate}
|
WHERE created >= {:startDate}
|
||||||
`).
|
`).
|
||||||
Bind(dbx.Params{
|
Bind(dbx.Params{
|
||||||
"startDate": startDate.Format("2006-01-02 15:04:05"),
|
"startDate": startDate,
|
||||||
}).
|
}).
|
||||||
Row(&totalItems)
|
Row(&totalItems)
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ func initPageViewCount(app *pocketbase.PocketBase, e *core.ServeEvent) {
|
||||||
)
|
)
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
strftime('%m/%d/%Y %H:%M:%S %Z', created) AS date,
|
strftime('%Y-%m-%dT%H:%M:%SZ', created) AS date,
|
||||||
COUNT(id) AS daily_count
|
COUNT(id) AS daily_count
|
||||||
FROM analyticsPageViews
|
FROM analyticsPageViews
|
||||||
WHERE
|
WHERE
|
||||||
|
|
Loading…
Reference in New Issue