Ask for specific values

This commit is contained in:
Ajay
2022-03-10 10:22:53 -05:00
parent effac2449a
commit 54013681ef

View File

@@ -167,7 +167,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.showNoticeAgain.style.display = "unset"; PageElements.showNoticeAgain.style.display = "unset";
} }
utils.sendRequestToServer("GET", "/api/userInfo?userID=" + Config.config.userID, (res) => { utils.sendRequestToServer("GET", "/api/userInfo?value=userName&value=viewCount&value=minutesSaved&userID=" + Config.config.userID, (res) => {
if (res.status === 200) { if (res.status === 200) {
const userInfo = JSON.parse(res.responseText) const userInfo = JSON.parse(res.responseText)
PageElements.usernameValue.innerText = userInfo.userName PageElements.usernameValue.innerText = userInfo.userName