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
2022-10-20 18:00:27 +01:00

18 lines
411 B
JavaScript

import { isValidSteamId } from "../../src/helpers/validateSteamId";
export default async function handler(req, res) {
const steamId = req.query.steamid;
if (!steamId) {
return res.status(404).json({
status: 404,
message: "Steam ID not provided",
});
}
const isValid = await isValidSteamId(steamId);
return res.status(200).json({
status: "OK",
message: isValid ? `Valid` : "Invalid",
});
}