Skip to content

Commit

Permalink
update new reading goal
Browse files Browse the repository at this point in the history
  • Loading branch information
r-carroll committed Oct 7, 2024
1 parent f26bf65 commit c846507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pi/backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function getPrayerMinutes() {
}

async function getReadingMinutes() {
const readQuery = 'select sum(duration) from reading;';
const readQuery = "select sum(duration) from reading where submitted_time > '2024-08-24 17:31:26.652635';";
let readResult = await queryDB(readQuery);
return readResult.rows[0].sum || 0;
}
Expand All @@ -105,7 +105,7 @@ async function getReadingByTimespan() {
const readQuery = `select json_agg(subquery) as timespans from (select *,
extract(hour from submitted_time) as hour,
extract(dow from submitted_time) as day
from reading where submitted_time is not null order by hour) as subquery;`
from reading where submitted_time is not null and submitted_time > '2024-08-24 17:31:26.652635' order by hour) as subquery;`

const readResult = await queryDB(readQuery);

Expand Down
4 changes: 2 additions & 2 deletions static/reading.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const apiUrl = 'https://drive.carrollmedia.dev:3008';
const WEEKLY_GOAL = 560;
const TOTAL_GOAL = 1680;
const WEEKLY_GOAL = 700;
const TOTAL_GOAL = 4800;
let tally = 0;
function init() {
// enable active states for buttons in mobile safari
Expand Down

0 comments on commit c846507

Please sign in to comment.