chore: consistent function signatures
This commit is contained in:
parent
816a072d65
commit
31eee646ba
6 changed files with 23 additions and 7 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "20.0.5",
|
||||
"version": "20.1.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "coryd.dev",
|
||||
"version": "20.0.5",
|
||||
"version": "20.1.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@cdransf/api-text": "^1.4.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "20.0.5",
|
||||
"version": "20.1.5",
|
||||
"description": "The source for my personal site. Built using 11ty.",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
@ -6,7 +6,7 @@ const SUPABASE_URL = process.env.SUPABASE_URL
|
|||
const SUPABASE_KEY = process.env.SUPABASE_KEY
|
||||
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
|
||||
|
||||
export default async function () {
|
||||
const fetchAlbumReleases = async () => {
|
||||
const today = DateTime.utc().toISO()
|
||||
const { data, error } = await supabase
|
||||
.from('albums')
|
||||
|
@ -39,3 +39,7 @@ export default async function () {
|
|||
}
|
||||
)).sort((a, b) => a.timestamp - b.timestamp)
|
||||
}
|
||||
|
||||
export default async function () {
|
||||
return await fetchAlbumReleases()
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ const SUPABASE_URL = process.env.SUPABASE_URL
|
|||
const SUPABASE_KEY = process.env.SUPABASE_KEY
|
||||
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
|
||||
|
||||
export default async function fetchGenresWithArtists() {
|
||||
const fetchBlogroll = async () => {
|
||||
const { data, error } = await supabase
|
||||
.from('authors')
|
||||
.select('*')
|
||||
|
@ -17,4 +17,8 @@ export default async function fetchGenresWithArtists() {
|
|||
}
|
||||
|
||||
return data.sort((a, b) => a['name'].toLowerCase().localeCompare(b['name'].toLowerCase()))
|
||||
}
|
||||
|
||||
export default async function () {
|
||||
return await fetchBlogroll()
|
||||
}
|
|
@ -5,7 +5,7 @@ const SUPABASE_URL = process.env.SUPABASE_URL
|
|||
const SUPABASE_KEY = process.env.SUPABASE_KEY
|
||||
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
|
||||
|
||||
export default async function fetchGenresWithArtists() {
|
||||
const fetchGenresWithArtists = async () => {
|
||||
const { data, error } = await supabase
|
||||
.from('genres')
|
||||
.select(`
|
||||
|
@ -37,4 +37,8 @@ export default async function fetchGenresWithArtists() {
|
|||
})
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
export default async function () {
|
||||
return await fetchGenresWithArtists()
|
||||
}
|
|
@ -4,7 +4,7 @@ const SUPABASE_URL = process.env['SUPABASE_URL']
|
|||
const SUPABASE_KEY = process.env['SUPABASE_KEY']
|
||||
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
|
||||
|
||||
export default async function () {
|
||||
const fetchGlobals = async () => {
|
||||
const { data, error } = await supabase
|
||||
.from('globals')
|
||||
.select(`
|
||||
|
@ -49,4 +49,8 @@ export default async function () {
|
|||
})
|
||||
|
||||
return globalData
|
||||
}
|
||||
|
||||
export default async function () {
|
||||
return await fetchGlobals()
|
||||
}
|
Reference in a new issue