mirror of
https://github.com/System-End/site.git
synced 2026-04-19 19:45:07 +00:00
remove uneccessary code
This commit is contained in:
parent
68ce6322ce
commit
3c3233a774
2 changed files with 0 additions and 63 deletions
|
|
@ -1,38 +0,0 @@
|
|||
// import AirtablePlus from 'airtable-plus';
|
||||
|
||||
// const usersTable = new AirtablePlus({
|
||||
// baseID: 'app4kCWulfB02bV8Q',
|
||||
// apiKey: process.env.AIRTABLE_API_KEY,
|
||||
// tableName: 'Users',
|
||||
// });
|
||||
|
||||
// export default async function handler(req, res) {
|
||||
// if (req.method !== 'POST') {
|
||||
// return res.status(405).json({ error: 'Method not allowed' });
|
||||
// }
|
||||
|
||||
// try {
|
||||
// // i don't think thsi is needed?
|
||||
// // const authorization = req.headers['authorization']?.replace('Bearer ', '').replace(/[^a-zA-Z0-9-]/g, '');
|
||||
|
||||
// const { userId } = req.body;
|
||||
|
||||
// const userRecords = await usersTable.read({
|
||||
// filterByFormula: `{Internal ID} = '${userId}'`,
|
||||
// });
|
||||
|
||||
// if (userRecords.length === 0) {
|
||||
// return res.status(404).json({ error: 'User not found' });
|
||||
// }
|
||||
|
||||
// const userRecordId = userRecords[0].id;
|
||||
// await usersTable.update(userRecordId, {
|
||||
// Voted: true,
|
||||
// });
|
||||
|
||||
// return res.status(200).json({ message: 'Marked as voted updated successfully' });
|
||||
// } catch (error) {
|
||||
// console.error('Error setting vote:', error);
|
||||
// return res.status(500).json({ error: error.message });
|
||||
// }
|
||||
// }
|
||||
|
|
@ -591,30 +591,6 @@ const Vote = () => {
|
|||
setEndPage(true)
|
||||
}
|
||||
|
||||
// const updateVoteStatus = async () => {
|
||||
// try {
|
||||
// const response = await fetch('/api/arcade/showcase/setVote', {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// },
|
||||
// body: JSON.stringify({
|
||||
// userId
|
||||
// })
|
||||
// })
|
||||
|
||||
// const data = await response.json()
|
||||
// if (data.error) {
|
||||
// console.error('Error updating voted status:', data.error)
|
||||
// } else {
|
||||
// console.log(data)
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.error('Error updating voted status:', error)
|
||||
// throw error
|
||||
// }
|
||||
// }
|
||||
|
||||
const submitVote = async (overall, technical, creative) => {
|
||||
const authToken = window.localStorage.getItem('arcade.authToken')
|
||||
|
||||
|
|
@ -639,7 +615,6 @@ const Vote = () => {
|
|||
} else {
|
||||
console.log(data)
|
||||
setSubmitStatus('success')
|
||||
// updateVoteStatus()
|
||||
// localStorage.setItem('arcade.voted', 'true')
|
||||
jsConfetti.current.addConfetti({
|
||||
confettiColors: ['#09AFB4', '#FF5C00']
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue