mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-25 12:27:16 +00:00
Refactoring: Camal case
This commit is contained in:
@@ -20,15 +20,15 @@ type Parameters = {
|
|||||||
export default async function handler(req: NextApiRequest, res: NextApiResponse<Data>) {
|
export default async function handler(req: NextApiRequest, res: NextApiResponse<Data>) {
|
||||||
let axiosRes;
|
let axiosRes;
|
||||||
const params: Parameters = req.query,
|
const params: Parameters = req.query,
|
||||||
userid = req.query.id[0];
|
userId = req.query.id[0];
|
||||||
|
|
||||||
if (!isSnowflake(userid))
|
if (!isSnowflake(userId))
|
||||||
return res.send({
|
return res.send({
|
||||||
error: `Specify a valid Discord user ID! If everything looks correct and this still occurs, please contact @cnraddd on Twitter.`,
|
error: `Specify a valid Discord user ID! If everything looks correct and this still occurs, please contact @cnraddd on Twitter.`,
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
axiosRes = await axios.get(`https://api.lanyard.rest/v1/users/${userid}`);
|
axiosRes = await axios.get(`https://api.lanyard.rest/v1/users/${userId}`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user