-
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
Changes from all commits
195adbd
e32e696
437940f
d037838
80631df
829ed4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { HashedUserID, UserID } from "./user.model"; | ||
import { Request } from "express"; | ||
import { Category, VideoID, VideoIDHash } from "./segments.model"; | ||
|
||
export interface APIRequest extends Request { | ||
query: { | ||
videoID: VideoID; | ||
userID: UserID | HashedUserID; | ||
adminUserID: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adminUserID is of type UserID |
||
enabled: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. enabled is type integer |
||
generate: "true" | "false"; | ||
service: "youtube" | "vimeo"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. services are in src/types/segments.model.s |
||
}, | ||
params: { | ||
prefix: VideoIDHash; | ||
}, | ||
body: { | ||
videoID: null | VideoID, | ||
year: number, | ||
views: number, | ||
channelID: string, | ||
service: string, | ||
categories: Category[]; | ||
userID: UserID | HashedUserID; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. userID retuned should always be HashedUserID |
||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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.
solving in
O(1)
instead ofO(n^2)