This is a parody of leetcode.com for designers. It's being developed live on Twitch.tv/zedashaw to demonstrate how to make a parody of a website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pixelperfectionist/api/discord.js

25 lines
647 B

import queues from "../lib/queues.js";
import { API } from "../lib/api.js";
import logging from "../lib/logging.js";
const log = logging.create(import.meta.url);
export const get = async (req, res) => {
const api = new API(req, res);
api.reply(200, { discord_sent: api.req.user.discord_sent });
}
get.authenticated = true;
export const post = async (req, res) => {
const api = new API(req, res);
log.debug(`Discord request received from user ${ req.user.id }`);
const discord_q = queues.create("discord/send_invite");
discord_q.add({user_id: api.req.user.id});
api.reply(200, { message: "OK" });
}
post.authenticated = true;