-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fixing Request Type #399
base: master
Are you sure you want to change the base?
Fixing Request Type #399
Conversation
// videoID already exists | ||
const destMatch = dest.find(s => s.videoID === obj.videoID); | ||
if (destMatch) { | ||
if (videoID in dest) { |
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.
solving in O(1)
instead of O(n^2)
categories: Category[]; | ||
userID: UserID | HashedUserID; | ||
} | ||
} |
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.
simplified interface for what the request actually looks like.
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.
adminID is always of type userID
** will comment on file itself
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.
most types are available here https://github.com/mchangrh/sb-openapi-source/blob/main/openapi.yaml
or https://wiki.sponsor.ajay.app/index.php/API_Docs
if you have any questions about types, just @ me on the discord blabdude#9793
adminUserID: string; | ||
enabled: string; | ||
generate: "true" | "false"; | ||
service: "youtube" | "vimeo"; |
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.
services are in src/types/segments.model.s
videoID: VideoID; | ||
userID: UserID | HashedUserID; | ||
adminUserID: string; | ||
enabled: string; |
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.
enabled is type integer
query: { | ||
videoID: VideoID; | ||
userID: UserID | HashedUserID; | ||
adminUserID: string; |
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.
adminUserID is of type UserID
channelID: string, | ||
service: string, | ||
categories: Category[]; | ||
userID: UserID | HashedUserID; |
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.
userID retuned should always be HashedUserID
Extracted the performance fix to 8759f8d |
This is a continuation of #390 so it has commits from that too.
In this PR:
Request
type intoAPIRequest
simplifying the request interface.