diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-08-22 22:12:00 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-08-22 22:12:00 +1000 |
commit | afefa5d64bd6cde7d6efa3a9a5a3ec67a6ca29a8 (patch) | |
tree | 07779150eba77c27bf75bc0c7890f4a3f976716e /scripts/stresstest/src/login | |
parent | removed char joiners as they are actually useful, added page break (diff) | |
parent | Merge remote-tracking branch 'Puyodead1/patch/prettier-config' into staging (diff) | |
download | server-afefa5d64bd6cde7d6efa3a9a5a3ec67a6ca29a8.tar.xz |
Merge remote-tracking branch 'upstream/staging' into fix/categoryNames
Diffstat (limited to 'scripts/stresstest/src/login')
-rw-r--r-- | scripts/stresstest/src/login/index.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/stresstest/src/login/index.js b/scripts/stresstest/src/login/index.js new file mode 100644 index 00000000..b153550e --- /dev/null +++ b/scripts/stresstest/src/login/index.js @@ -0,0 +1,20 @@ +const fetch = require("node-fetch"); +const fs = require("fs"); +let config = require("../../config.json"); +module.exports = login; +async function login(account) { + let body = { + fingerprint: "805826570869932034.wR8vi8lGlFBJerErO9LG5NViJFw", + login: account.email, + password: account.password + }; + let x = await fetch(config.url + "/auth/login", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify(body) + }); + console.log(x); + x = await x.json(); + console.log(x); + return x; +} |