chore: dates + deps
This commit is contained in:
parent
3e6fe938f7
commit
68dd84065f
3 changed files with 11 additions and 12 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "16.0.2",
|
||||
"version": "16.0.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "coryd.dev",
|
||||
"version": "16.0.2",
|
||||
"version": "16.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@cdransf/api-text": "^1.2.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "16.0.2",
|
||||
"version": "16.0.3",
|
||||
"description": "The source for my personal site. Built using 11ty.",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
@ -36,13 +36,12 @@ const formatData = (data) => {
|
|||
|
||||
export default async function() {
|
||||
try {
|
||||
const now = DateTime.now()
|
||||
const startOfWeek = now.minus({ days: now.weekday + 1 }).startOf('day')
|
||||
const endOfWeek = now.minus({ days: now.weekday - 7 }).endOf('day')
|
||||
const startOfWeekSeconds = startOfWeek.toSeconds()
|
||||
const endOfWeekSeconds = endOfWeek.toSeconds()
|
||||
const weekNumber = now.toFormat('kkkk-WW')
|
||||
|
||||
const now = DateTime.now();
|
||||
const startOfWeek = now.minus({ days: now.weekday % 7 }).startOf('day');
|
||||
const endOfWeek = startOfWeek.plus({ days: 6 }).endOf('day');
|
||||
const startOfWeekSeconds = startOfWeek.toSeconds();
|
||||
const endOfWeekSeconds = endOfWeek.toSeconds();
|
||||
const weekNumber = now.toFormat('kkkk-WW');
|
||||
let { data: recentCharts } = await supabase
|
||||
.from('weekly_charts')
|
||||
.select('*')
|
||||
|
@ -54,7 +53,7 @@ export default async function() {
|
|||
return {
|
||||
title: formattedData['content'],
|
||||
description: formattedData['description'],
|
||||
url: `https://coryd.dev/now?ts=${chart['week']}#artists`,
|
||||
url: `https://coryd.dev/music?ts=${chart['week']}`,
|
||||
date: chart['date']
|
||||
}
|
||||
})
|
||||
|
@ -65,7 +64,7 @@ export default async function() {
|
|||
return {
|
||||
title: formattedData['content'],
|
||||
description: formattedData['description'],
|
||||
url: `https://coryd.dev/now?ts=${chart['week']}#artists`,
|
||||
url: `https://coryd.dev/music?ts=${chart['week']}`,
|
||||
date: chart['date']
|
||||
}
|
||||
})
|
||||
|
|
Reference in a new issue