fix getCWS util

This commit is contained in:
Michael C
2023-02-21 03:24:32 -05:00
parent 37a1c7e88d
commit c6795a783d

View File

@@ -5,7 +5,7 @@ export const getCWSUsers = (extID: string) =>
axios.post(`https://chrome.google.com/webstore/ajax/detail?pv=20210820&id=${extID}`)
.then((res) => res.data.split("\n")[2])
.then((data) => JSON.parse(data))
.then((data) => (data[1][1][0][23]).replaceAll(/,|\+/,""))
.then((data) => (data[1][1][0][23]).replaceAll(/,|\+/g,""))
.then((data) => parseInt(data))
.catch((err) => {
Logger.error(`Error getting chrome users - ${err}`);