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

Commit

Permalink
Expiry times (#169)
Browse files Browse the repository at this point in the history
* change Redis TTL variable name to indicate it uses seconds

* acceptExpired
  • Loading branch information
lwojcik authored Sep 4, 2020
1 parent 474a99a commit bc4b1c6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 55 deletions.
91 changes: 38 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"fastify-plugin": "2.3.3",
"fastify-redis": "4.0.3",
"fastify-redis-mock": "1.0.0",
"fastify-twitch-ebs-tools": "1.0.3",
"fastify-twitch-ebs-tools": "1.1.1",
"mongoose": "5.10.2",
"starcraft2-api": "1.3.8",
"jest": "26.4.2",
Expand Down
2 changes: 1 addition & 1 deletion src/@types/fastify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ declare module 'fastify' {
};
twitchEbs: {
verifyBroadcaster: (payload: string) => boolean;
validatePermission: (token: string, channelid: string, role: string | string[]) => boolean;
validatePermission: (token: string, channelid: string, role: string | string[], acceptExpired?: boolean) => boolean;
}
sas: {
getProfile: (
Expand Down
1 change: 1 addition & 0 deletions src/plugins/twitchConfigValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const twitchConfigValidatorPlugin: FastifyPlugin<TwitchPluginOptions>
token,
channelid,
roles,
true,
);

if (channelIdCorrect && payloadValid) {
Expand Down

0 comments on commit bc4b1c6

Please sign in to comment.