Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Feature/supabase integration #54

Merged
merged 12 commits into from
Feb 20, 2022
Merged

Feature/supabase integration #54

merged 12 commits into from
Feb 20, 2022

Conversation

VanishMax
Copy link
Collaborator

Implements #39

Since now, the use of the app requires adding Environmental variables. To get them, go into the Supabase dashboard -> settings -> API, and copy 'service_role'-'secret' token into the VITE_SUPABASE_KEY, and URL variable into the VITE_SUPABASE_URL.

@cloudflare-pages
Copy link

cloudflare-pages bot commented Feb 18, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2b632d6
Status: ✅  Deploy successful!
Preview URL: https://2c4c8768.cast-iu.pages.dev

View logs

Copy link
Collaborator

@illright illright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please rename the supabase directory to api?

@illright
Copy link
Collaborator

@alkaitagi I think the GitHub usernames for the reviewer lottery are case-sensitive. Max was assigned two reviewers, I suppose it is because he's not recognized as vanishmax and instead recognized as VanishMax

@VanishMax VanishMax linked an issue Feb 18, 2022 that may be closed by this pull request
src/lib/shared/constants.ts Outdated Show resolved Hide resolved
src/lib/shared/api/supabase.ts Outdated Show resolved Hide resolved
src/lib/shared/api/proxies.ts Outdated Show resolved Hide resolved
src/lib/shared/api/episodes.ts Outdated Show resolved Hide resolved
@illright
Copy link
Collaborator

Btw, I don't think that "implements" is a valid keyword to close issues in GitHub. I think the options are fixes, closes and resolves, I prefer "Closes"

Copy link
Collaborator

@illright illright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final set of comments

id: episode.id,
title: episode.title,
duration: episode.duration,
audioUrl: episode.recording_object_id,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this really going to be a URL? I'm concerned it might just be an ID

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on it with @khaledismaeel. There's an issue with Supabase we need to solve first

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Supabase storage is bad in millions of ways, so I added a column audio_url to the Episodes table. Yeah, we won't be able to upload the music now, only add a link

src/lib/shared/api/adapters.ts Outdated Show resolved Hide resolved
import { transformEpisodeRequest } from './adapters';
import supabaseClient from './supabase';

export const episodeRead = async (): Promise<Episode[]> => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: episodeRead sounds ambiguous to me. I think of "read" and "get" as synonyms in terms of APIs.

suggestion: perhaps listEpisodes could work better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to episodesList, so, when someone will import from api directory, it'll be import { episidesList } from '$lib/shared/api';. Since people first think about an entity, and then about the method, the names should be easy to find.

@VanishMax VanishMax merged commit 966c720 into main Feb 20, 2022
@VanishMax VanishMax deleted the feature/supabase-integration branch February 20, 2022 07:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fetch a list of podcasts with their meta-information
2 participants