mirror of
https://github.com/anatolykopyl/status.git
synced 2026-03-26 12:54:46 +00:00
Токен в .env и новый стиль
This commit is contained in:
@@ -4,9 +4,10 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Статус</title>
|
<title>Статус</title>
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
|
<link href="https://fonts.googleapis.com/css2?family=Russo+One&display=swap" rel="stylesheet">
|
||||||
|
<link href="style.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a class='btn btn-primary' href="status.anatolykopyl.ru/status">Обнови мой эмодзи статус!</a>
|
<a href="status.anatolykopyl.ru/status">Обнови мой эмодзи статус!</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -8,16 +8,18 @@ import { httpsReq } from "./httpsReq.js";
|
|||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
const app = Express();
|
const app = Express();
|
||||||
|
const port = process.env.PORT || 5001;
|
||||||
|
|
||||||
const port = process.env.PORT || 5000;
|
const statusIds = [1, 2, 3, 4, 5, 9, 10, 17, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 38, 39];
|
||||||
|
|
||||||
app.use(Cors());
|
app.use(Cors());
|
||||||
|
|
||||||
app.get('/update', (req, res) => {
|
app.get('/update', (req, res) => {
|
||||||
let id = Math.floor(Math.random() * 34);
|
var id = statusIds[Math.floor(Math.random() * statusIds.length)];
|
||||||
let url = `https://api.vk.com/method/users.setCovidStatus?access_token=1f3a7a0c80ba9d1e4af5b3e9ac583c98aa6d036be89c2508f4486913b1cbdb125a9a8c4440b6dbb57f348&status_id=${id}&v=5.103`;
|
let url = `https://api.vk.com/method/users.setCovidStatus?access_token=${process.env.TOKEN}&status_id=${id}&v=5.103`;
|
||||||
httpsReq(url).then(() => {
|
httpsReq(url).then(() => {
|
||||||
res.send();
|
console.log(response);
|
||||||
|
res.redirect("https://status.anatolykopyl.ru");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user