mirror of
https://github.com/neongamerbot-qk/hackclub-nest
synced 2024-11-24 09:23:42 +00:00
Compare commits
No commits in common. "f336ec37b38a741cf880bfd962ce190b43a61190" and "95d79f8d59a45f793017e7a55691cafc0df984bf" have entirely different histories.
f336ec37b3
...
95d79f8d59
1 changed files with 28 additions and 33 deletions
|
@ -202,16 +202,11 @@ app.post("/spotify/submitsong", async (req, res) => {
|
||||||
added_at: Date.now(),
|
added_at: Date.now(),
|
||||||
});
|
});
|
||||||
addSongToPlaylist(formattedURI);
|
addSongToPlaylist(formattedURI);
|
||||||
fetch("https://slack.mybot.saahild.com/send-spotify", {
|
fetch("https://slack.mybot.saahild.com/send-private", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
// message: {
|
channel: "C07RE4N7S4B",
|
||||||
// channel: "C07RE4N7S4B",
|
text: `:new_spotify: New Song: ${songurl} - added by <@${req.session.info.user.id}>`,
|
||||||
// text: `:new_spotify: New Song: ${songurl} - added by <@${req.session.info.user.id}>`,
|
|
||||||
// },
|
|
||||||
songurl,
|
|
||||||
user: req.session.info.user.id,
|
|
||||||
noping: Boolean(process.env.TESTING),
|
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: process.env.AUTH_FOR_ZEON,
|
Authorization: process.env.AUTH_FOR_ZEON,
|
||||||
|
@ -220,32 +215,32 @@ app.post("/spotify/submitsong", async (req, res) => {
|
||||||
})
|
})
|
||||||
.then((r) => r.json())
|
.then((r) => r.json())
|
||||||
.then((d) => {
|
.then((d) => {
|
||||||
// fetch("https://slack.mybot.saahild.com/send-private", {
|
fetch("https://slack.mybot.saahild.com/send-private", {
|
||||||
// method: "POST",
|
method: "POST",
|
||||||
// body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
// channel: "C07RE4N7S4B",
|
channel: "C07RE4N7S4B",
|
||||||
// thread_ts: d.ts,
|
thread_ts: d.ts,
|
||||||
// text: `:thread: Responses about new song here please!`,
|
text: `:thread: Responses about new song here please!`,
|
||||||
// }),
|
}),
|
||||||
// headers: {
|
headers: {
|
||||||
// Authorization: process.env.AUTH_FOR_ZEON,
|
Authorization: process.env.AUTH_FOR_ZEON,
|
||||||
// "Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
// if (!process.env.TESTING) {
|
if (!process.env.TESTING) {
|
||||||
// fetch("https://slack.mybot.saahild.com/send-private", {
|
fetch("https://slack.mybot.saahild.com/send-private", {
|
||||||
// method: "POST",
|
method: "POST",
|
||||||
// body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
// channel: "C07RE4N7S4B",
|
channel: "C07RE4N7S4B",
|
||||||
// text: `<!subteam^S07RGTY93J8>`,
|
text: `<!subteam^S07RGTY93J8>`,
|
||||||
// }),
|
}),
|
||||||
// headers: {
|
headers: {
|
||||||
// Authorization: process.env.AUTH_FOR_ZEON,
|
Authorization: process.env.AUTH_FOR_ZEON,
|
||||||
// "Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
res.redirect("/home?s=1");
|
res.redirect("/home?s=1");
|
||||||
});
|
});
|
||||||
app.get("/spotify/link", async (req, res) => {
|
app.get("/spotify/link", async (req, res) => {
|
||||||
|
|
Loading…
Reference in a new issue