This repository has been archived on 2023-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
beatsaber-overlay/pages/api/validateid.js

18 lines
392 B
JavaScript
Raw Normal View History

import Utils from "../../src/utils/utils";
2022-10-19 16:15:24 +00:00
export default async function handler(req, res) {
const steamId = req.query.steamid;
if (!steamId) {
return res.json({
status: 404,
message: "Steam id not provided: Provide in the query.",
});
}
const isValid = await Utils.isValidSteamId(steamId);
2022-10-19 16:15:24 +00:00
return res.json({
status: "OK",
2022-10-20 10:09:41 +00:00
message: !isValid ? `Valid` : "Invalid",
2022-10-19 16:15:24 +00:00
});
}