diff --git a/server/public/layouts/client/token.handlebars b/server/public/layouts/client/token.handlebars index c35989ba..4f64e336 100644 --- a/server/public/layouts/client/token.handlebars +++ b/server/public/layouts/client/token.handlebars @@ -21,12 +21,12 @@
Here is your api token
Use it wisely, and don't lose it!
-As of now, the tokens have a limit of 100 requests a second. If you need a higher limit, just contact the team and we'll set you up for as much as you need.
+As of now, the tokens have a limit of 20 requests a second. If you need a higher limit, just contact the team and we'll set you up for as much as you need.
{{else}}Apply for a API-token with your email here! You'll get an email on the specified address, with a link. Follow that link, and the token will be shown to you! Take good care of it, and don't lose it. It won't be shown to you again.
If you're wondering anything about how the api works, there is a guide on our GitHub. You can also click HERE to be taken to the detailed README.
-As of now, the tokens have a limit of 100 requests a second. If you need a higher limit, just contact the team and we'll set you up for as much as you need.
+As of now, the tokens have a limit of 20 requests a second. If you need a higher limit, just contact the team and we'll set you up for as much as you need.
If you want to restrict the token for use on one domain only, you can change the Origin from * to the website of your choice (if you want for https://zoff.me, then you'd input zoff.me).
{{/if}} diff --git a/server/routing/client/api.js b/server/routing/client/api.js index 8aecdba8..c8242310 100644 --- a/server/routing/client/api.js +++ b/server/routing/client/api.js @@ -1274,7 +1274,7 @@ try { } token_db.collection("api_links").find({token: token}, function(e, d) { if(results_find.length == 0 || (d.length == 0 && results_find.length > 0 && !results_find[0].active)) { - token_db.collection("api_token").insert({name: name, origin: origin, token: id, usage: 0, active: false, limit: 100}, function(err, docs){ + token_db.collection("api_token").insert({name: name, origin: origin, token: id, usage: 0, active: false, limit: 20}, function(err, docs){ token_db.collection("api_links").insert({id: uniqid_link, token: id, createdAt: new Date()}, function(err, docs) { let transporter = nodemailer.createTransport(mailconfig);