feat: login handler
This commit is contained in:
1 parent
54ab1dc091
commit
bd8a1d715f
4 files changed
+35
-7
No files matched your search
@@ -2,7 +2,7 @@ let LoginRuntime = {
|
||||
LoginCurrentTime: Date.now(),
|
||||
LoginCurrentRate: 0
|
||||
}
|
||||
export const Data = {
|
||||
export const DataRuntime = {
|
||||
checkLoginRate: async function (RateLimit: number): Promise<boolean> {
|
||||
if (Date.now() - LoginRuntime.LoginCurrentTime > 1000 * 60) {
|
||||
LoginRuntime.LoginCurrentRate = 0;//超出时间重置限速
|
||||
|
||||
Reference in new issue
Block a user