chore: consistent function signatures

This commit is contained in:
Cory Dransfeldt 2024-07-10 13:09:28 -07:00
parent 816a072d65
commit 31eee646ba
No known key found for this signature in database
6 changed files with 23 additions and 7 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "20.0.5", "version": "20.1.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "20.0.5", "version": "20.1.5",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/api-text": "^1.4.0", "@cdransf/api-text": "^1.4.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "20.0.5", "version": "20.1.5",
"description": "The source for my personal site. Built using 11ty.", "description": "The source for my personal site. Built using 11ty.",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -6,7 +6,7 @@ const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env.SUPABASE_KEY const SUPABASE_KEY = process.env.SUPABASE_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
export default async function () { const fetchAlbumReleases = async () => {
const today = DateTime.utc().toISO() const today = DateTime.utc().toISO()
const { data, error } = await supabase const { data, error } = await supabase
.from('albums') .from('albums')
@ -39,3 +39,7 @@ export default async function () {
} }
)).sort((a, b) => a.timestamp - b.timestamp) )).sort((a, b) => a.timestamp - b.timestamp)
} }
export default async function () {
return await fetchAlbumReleases()
}

View file

@ -4,7 +4,7 @@ const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env.SUPABASE_KEY const SUPABASE_KEY = process.env.SUPABASE_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
export default async function fetchGenresWithArtists() { const fetchBlogroll = async () => {
const { data, error } = await supabase const { data, error } = await supabase
.from('authors') .from('authors')
.select('*') .select('*')
@ -17,4 +17,8 @@ export default async function fetchGenresWithArtists() {
} }
return data.sort((a, b) => a['name'].toLowerCase().localeCompare(b['name'].toLowerCase())) return data.sort((a, b) => a['name'].toLowerCase().localeCompare(b['name'].toLowerCase()))
}
export default async function () {
return await fetchBlogroll()
} }

View file

@ -5,7 +5,7 @@ const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env.SUPABASE_KEY const SUPABASE_KEY = process.env.SUPABASE_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
export default async function fetchGenresWithArtists() { const fetchGenresWithArtists = async () => {
const { data, error } = await supabase const { data, error } = await supabase
.from('genres') .from('genres')
.select(` .select(`
@ -37,4 +37,8 @@ export default async function fetchGenresWithArtists() {
}) })
return data return data
}
export default async function () {
return await fetchGenresWithArtists()
} }

View file

@ -4,7 +4,7 @@ const SUPABASE_URL = process.env['SUPABASE_URL']
const SUPABASE_KEY = process.env['SUPABASE_KEY'] const SUPABASE_KEY = process.env['SUPABASE_KEY']
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
export default async function () { const fetchGlobals = async () => {
const { data, error } = await supabase const { data, error } = await supabase
.from('globals') .from('globals')
.select(` .select(`
@ -49,4 +49,8 @@ export default async function () {
}) })
return globalData return globalData
}
export default async function () {
return await fetchGlobals()
} }