-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use constants for API names #5693
base: development
Are you sure you want to change the base?
Use constants for API names #5693
Conversation
this.pageNumber = 1 | ||
}, | ||
|
||
getHashtag: async function() { | ||
const hashtag = decodeURIComponent(this.$route.params.hashtag) | ||
if (this.backendFallback || this.backendPreference === 'local') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sneaky fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's something i noticed while switching to the constants (i included it in the description)
export const API_DATA_SOURCES = { | ||
LOCAL_API: 'local', | ||
INVIDIOUS_API: 'invidious' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you named it as API_DATA_SOURCES
, why include API
in constants names too?
@@ -384,7 +385,7 @@ export function filterInvidiousFormats(formats) { | |||
}) | |||
} | |||
|
|||
export async function getHashtagInvidious(hashtag, page) { | |||
export async function getHashtagInvidious(hashtag, page = 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sneaky but fine
Use constants for API names
Pull Request Type
Related issue
Since we reuse 'local' and 'invidious' a lot in our code, I thought it'd be a good idea to use constants for those instead
Description
Desktop