fix parsing of ids, fixes #61

This commit is contained in:
gempir 2020-09-26 00:26:34 +02:00
parent d5de1ce3e7
commit 200f7936b5
3 changed files with 14 additions and 6 deletions

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@ export default function (channel, username, year, month) {
}
let usernamePath = "user";
if (username.startsWith("id:")) {
usernamePath = "id";
usernamePath = "userid";
}
dispatch(setLoading(true));

View file

@ -18,7 +18,7 @@ export default function (channel, username, year, month) {
}
let usernamePath = "user";
if (username.startsWith("id:")) {
usernamePath = "id";
usernamePath = "userid";
}
const logs = {}
@ -72,7 +72,7 @@ function fetchAvailableLogs(baseUrl, channel, username) {
}
let userQuery = "user=" + username;
if (username.startsWith("id:")) {
userQuery = "userid" + username.replace("id:", "")
userQuery = "userid=" + username.replace("id:", "")
}
return fetch(`${baseUrl}/list?${channelQuery}&${userQuery}`, { headers: { "Content-Type": "application/json" } }).then((response) => {