Skip to content

Commit 79f7c95

Browse files
committed
⚡ tokens changed
1 parent 6abd969 commit 79f7c95

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

FrontEnd/event.html

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<br>
4444
<button id="all">Get All Events</button>
4545
<button id="reg">Get Registered Events</button>
46+
<button id="getRegisteredBtn" onclick="getRegistered()">Get Registered Events</button>
47+
48+
<div id="registered-events-container"></div>
49+
4650
<!-- <button id="sug">Get Suggestions</button> -->
4751
</div>
4852
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
@@ -132,29 +136,31 @@ <h3>${eventname}</h3>
132136
console.log(err);
133137
});
134138
};
139+
//const container = document.getElementById('registered-events-container');
135140

136-
const getRegistered = async () => {
137-
try {
138-
const { data } = await axios.get(baseUrl + '/events/registered', config);
139-
let html = "";
140-
data.forEach((e) => {
141-
let eventname = e.name.text;
142-
eventname[0] = eventname[0].toUpperCase();
143-
let date = new Date(e.start.utc).toString().slice(0, 15);
144-
html += `<div class="card">
145-
<div class="box">
146-
<div class="content">
147-
<h3>${eventname}</h3>
148-
<p><i class="fa-regular fa-calendar"></i> ${date}</p>
149-
</div>
150-
</div>
151-
</div>`;
152-
});
153-
container.innerHTML = html;
154-
} catch (error) {
155-
console.log(error);
156-
}
157-
};
141+
const getRegistered = async () => {
142+
try {
143+
const { data } = await axios.get(baseUrl + '/events/registered', config);
144+
let html = "";
145+
data.forEach((e) => {
146+
let eventname = e.name.text;
147+
eventname = eventname.charAt(0).toUpperCase() + eventname.slice(1);
148+
let date = new Date(e.start.utc).toString().slice(0, 15);
149+
html += `<div class="card">
150+
<div class="box">
151+
<div class="content">
152+
<h3>${eventname}</h3>
153+
<p><i class="fa-regular fa-calendar"></i> ${date}</p>
154+
</div>
155+
</div>
156+
</div>`;
157+
});
158+
container.innerHTML = html;
159+
} catch (error) {
160+
console.log(error);
161+
}
162+
};
163+
158164

159165
//new
160166

FrontEnd/js/users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ document.addEventListener("DOMContentLoaded", function () {
22
const userTableBody = document.getElementById("userTableBody");
33

44

5-
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM2NjU4Nzg5YzVlNDU4NTg3NzdmMWUiLCJpYXQiOjE2OTA3MzgxMTksImV4cCI6MTY5MDgyNDUxOX0.IfBnFvEq9u0g1c5ko8b5hKGA22j4XDCxsTZiqvJG410";
5+
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM2NjU4Nzg5YzVlNDU4NTg3NzdmMWUiLCJpYXQiOjE2OTA4Mjc5NzgsImV4cCI6MTY5MDkxNDM3OH0.huVw337szgxXkvtRKOeMbHxbtf-QG-AGMU6tdOit0lY";
66

77

88
fetch("http://localhost:8000/api/user/all", {

FrontEnd/users.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h1>All Users</h1>
4343
document.addEventListener("DOMContentLoaded", function () {
4444
const userTableBody = document.getElementById("userTableBody");
4545

46-
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM2NjU4Nzg5YzVlNDU4NTg3NzdmMWUiLCJpYXQiOjE2OTA3MzgxMTksImV4cCI6MTY5MDgyNDUxOX0.IfBnFvEq9u0g1c5ko8b5hKGA22j4XDCxsTZiqvJG410";
46+
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGM2NjU4Nzg5YzVlNDU4NTg3NzdmMWUiLCJpYXQiOjE2OTA4Mjc5NzgsImV4cCI6MTY5MDkxNDM3OH0.huVw337szgxXkvtRKOeMbHxbtf-QG-AGMU6tdOit0lY";
4747

4848
axios.get("http://localhost:8000/api/user/all", {
4949
headers: {

backend/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SECRET_KEY = secret
22
PORT = 8000
3-
EXPIRES = 86400s
3+
EXPIRES = 86400000s
44
API_TOKEN = KCIV4OKXGX3FO6FDGVYC
55
ORGANIZATION_ID = 1675133633463
66
MONGO_URI=mongodb+srv://devo_bhai:devo@cluster0.y70v98m.mongodb.net/Users?retryWrites=true&w=majority

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy