Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyRabbitty committed Dec 2, 2023
1 parent bf14d6b commit 90ee7b2
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
19 changes: 11 additions & 8 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,22 @@ MONGODB_DATA_API_KEY='53k701TP5UXyiYs4o1lwcLZMfrKxIMXPwW5ow2PXqf6EdiM44RcXX8jqc7
MONGODB_DATA_API_URL='https://eu-central-1.aws.data.mongodb-api.com/app/data-kgvgi/endpoint/data/v1'
MONGODB_DATA_SOURCE='Cluster0'

NEXT_PUBLIC_SUPABASE_URL = https://cexjotyxqjbfepuuuouo.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InllaWppZGRnYXRzamhyY3psenp5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDAyODE4ODUsImV4cCI6MjAxNTg1Nzg4NX0.uY3xUb3AFK2tXoltXV3CcnYfJpu0CA1byN8VAeSs26I
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNleGpvdHl4cWpiZmVwdXV1b3VvIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcwMDI4NTg4NywiZXhwIjoyMDE1ODYxODg3fQ.MJQD3oXjFdnsF7zBpgmsJ4hW-SMPIQ9S0PVvOy3P8ls
NEXT_PUBLIC_SUPABASE_URL = https://cexjotyxqjbfepuuuouo.supabase.co/
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNleGpvdHl4cWpiZmVwdXV1b3VvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDAyODU4ODcsImV4cCI6MjAxNTg2MTg4N30.XFxYCkBHVDkWP-HgCgCQYg7xA6sg84yibrsWi0P10Uo
# SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNleGpvdHl4cWpiZmVwdXV1b3VvIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcwMDI4NTg4NywiZXhwIjoyMDE1ODYxODg3fQ.MJQD3oXjFdnsF7zBpgmsJ4hW-SMPIQ9S0PVvOy3P8ls

# DISCORD_ID=1174968583202275418
# DISCORD_PUBLIC_KEY=wpkkDwWpLeTItHNn3OTsh-ZzW-IpJeCX

DISCORD_ID=1069768033989562388
DISCORD_PUBLIC_KEY=eh1LSI1Ob-lA5I7qZHjyulRL6XIq_hht
DISCORD_ID=1174968583202275418
DISCORD_PUBLIC_KEY=wpkkDwWpLeTItHNn3OTsh-ZzW-IpJeCX

ADMIN_ADDRESS='5oxRC2qUZhVdMHiETJ7RrEbFnnuGa2XNVRhS3bGG1Ywg'


# NEXT_PUBLIC_SUPABASE_URL=https://ucazhsefbxuwhxpnrbub.supabase.co/
# NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVjYXpoc2VmYnh1d2h4cG5yYnViIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzU5NTQ0MzMsImV4cCI6MTk5MTUzMDQzM30.lIL9Bufl76dacBfFWWJdsXwa4JmwvCGAkJzBnwNkIE0
# DISCORD_ID=1069768033989562388
# DISCORD_PUBLIC_KEY=eh1LSI1Ob-lA5I7qZHjyulRL6XIq_hht





Expand Down
2 changes: 2 additions & 0 deletions components/Counter/Counter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const CountdownTimer = ({ countdownTimestampMs, finish, width }) => {
setshowloading(false);
}, 2000);

console.log('countdownTimestampMs ===> ', countdownTimestampMs);

return () => {
time;
};
Expand Down
6 changes: 3 additions & 3 deletions components/home/games/gamestask.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ export default function gamestask() {
<span className="truncate">0 / 500</span>
</div>
{/* Error */}
<Image
src={'https://media.discordapp.net/attachments/1085293900706627595/1086248228221104210/unsplash_-SmCKTIcH5E_8.png'}
{/* <Image
src={el.img}
width={400}
height={400}
alt=""
className="object-cover object-center w-full h-full"
/>
/> */}
</div>

<div
Expand Down
1 change: 1 addition & 0 deletions components/twitter/twittter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export default function twittter({
setLive(false);
start_raffel(signal);
} else {

setFinishTime(Number(data.postAt) + finish_times);
setLive(true);
}
Expand Down
1 change: 1 addition & 0 deletions components/utils/time.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export function get_remainig_time(time, posting_days) {
const now = Date.now();
const posting_time = 24 * 60 * 60 * 1000 * posting_days;

const finish = time + posting_time;
if (now >= finish) return "FINISH";
const ramaining_time = finish - now;
Expand Down
3 changes: 2 additions & 1 deletion pages/api/database/raffle_start.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export default async function handler(req, res) {
}),
});
const readUserInfo = (await user_info.json()).document;
const finish_times = 24 * 60 * 60 * 1000 * 2;
// const finish_times = 24 * 60 * 60 * 1000 * 2;
const finish_times = 5 * 60 * 1000;

if (readUserInfo) {
if (!readUserInfo.live) {
Expand Down
18 changes: 9 additions & 9 deletions pages/api/database/rate.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export default async function handler(req, res) {


//TODO
// if (!session) {
// return res.status(401).json({
// status: "ERR",
// message: "connect your discord first"
// })
// }
if (!session) {
return res.status(401).json({
status: "ERR",
message: "connect your discord first"
})
}

// verify if the user is the one that we want him to be [owner]
// var enc = new TextEncoder(); // always utf-8
Expand All @@ -72,7 +72,7 @@ export default async function handler(req, res) {
// )

// const signature = req.body.seg;
// const pubkey = req.body.address
const pubkey = req.body.address

// const result = nacl.sign.detached.verify(signData, bs58.decode(signature), pubkey.toBuffer())

Expand Down Expand Up @@ -102,9 +102,9 @@ export default async function handler(req, res) {

const rate = {
rate: req.body.rate,
// address: pubkey,
address: pubkey,
twitter_id: token.sub,
// discord_id: session.user.user_metadata.sub //TODO
discord_id: session.user.user_metadata.sub //TODO
}


Expand Down

0 comments on commit 90ee7b2

Please sign in to comment.