mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-05 10:30:55 +01:00
Make username optional and loosen routing requirements
This commit is contained in:
parent
026a1f50d6
commit
62d2a54438
1 changed files with 9 additions and 7 deletions
|
@ -30,28 +30,30 @@ export const getBaseRedirectUrl = (c: Context) => {
|
||||||
const tweetRequest = async (c: Context) => await statusRequest(c);
|
const tweetRequest = async (c: Context) => await statusRequest(c);
|
||||||
const _profileRequest = async (c: Context) => await profileRequest(c);
|
const _profileRequest = async (c: Context) => await profileRequest(c);
|
||||||
|
|
||||||
|
twitter.get('/:endpoint{status(es)?}/:id{.+}/:language{[a-z]+}?', tweetRequest);
|
||||||
|
twitter.get('/:endpoint{status(es)?}/:id{.+}/', tweetRequest);
|
||||||
twitter.get('/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:language{[a-z]+}?', tweetRequest);
|
twitter.get('/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:language{[a-z]+}?', tweetRequest);
|
||||||
twitter.get('/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/', tweetRequest);
|
twitter.get('/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/', tweetRequest);
|
||||||
twitter.get('/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/:language{[a-z]+}?', tweetRequest);
|
twitter.get('/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:language{[a-z]+}?', tweetRequest);
|
||||||
twitter.get('/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/', tweetRequest);
|
twitter.get('/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/', tweetRequest);
|
||||||
twitter.get(
|
twitter.get(
|
||||||
'/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/',
|
'/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/',
|
||||||
tweetRequest
|
tweetRequest
|
||||||
);
|
);
|
||||||
twitter.get(
|
twitter.get(
|
||||||
'/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/:language{[a-z]+}?',
|
'/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/:language{[a-z]+}?',
|
||||||
tweetRequest
|
tweetRequest
|
||||||
);
|
);
|
||||||
twitter.get(
|
twitter.get(
|
||||||
'/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/',
|
'/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/',
|
||||||
tweetRequest
|
tweetRequest
|
||||||
);
|
);
|
||||||
twitter.get(
|
twitter.get(
|
||||||
'/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/:language{[a-z]+}?',
|
'/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/:language{[a-z]+}?',
|
||||||
tweetRequest
|
tweetRequest
|
||||||
);
|
);
|
||||||
twitter.get(
|
twitter.get(
|
||||||
'/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/status/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/',
|
'/:prefix{(dir|dl)}/:handle{[0-9a-zA-Z_]+}/:endpoint{status(es)?}/:id{.+}/:mediaType{(photos?|videos?)}/:mediaNumber{[1-4]}/',
|
||||||
tweetRequest
|
tweetRequest
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue