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",
|
"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",
|
||||||
|
|
|
@ -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": {
|
||||||
|
|
|
@ -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()
|
||||||
|
}
|
||||||
|
|
|
@ -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('*')
|
||||||
|
@ -18,3 +18,7 @@ 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()
|
||||||
|
}
|
|
@ -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(`
|
||||||
|
@ -38,3 +38,7 @@ export default async function fetchGenresWithArtists() {
|
||||||
|
|
||||||
return data
|
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_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(`
|
||||||
|
@ -50,3 +50,7 @@ export default async function () {
|
||||||
|
|
||||||
return globalData
|
return globalData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default async function () {
|
||||||
|
return await fetchGlobals()
|
||||||
|
}
|
Reference in a new issue