fix(plugin): ensure endpoints with / works in plugin

This commit is contained in:
BennyKok 2023-12-24 18:51:59 +08:00
parent dc5dd81358
commit dc5ae7a7b1

View File

@ -147,6 +147,11 @@ function addButton() {
console.log(prompt);
// TODO trim the ending / from endpoint is there is
if (endpoint.endsWith("/")) {
endpoint = endpoint.slice(0, -1);
}
const apiRoute = endpoint + "/api/upload"
// const userId = apiKey
try {