xmlns add

This commit is contained in:
Conrad
2021-06-18 23:31:14 -04:00
parent 9f27008f91
commit 4d2c3eb0b8
2 changed files with 2 additions and 3 deletions

View File

@@ -23,8 +23,7 @@ export default function handler(
axios.get(`https://api.lanyard.rest/v1/users/${userid}`)
.then((response) => {
// let svg = renderCard(response.data);
res.send(renderCard(response.data, params));
res.status(200).send(renderCard(response.data, params));
})
.catch((err) => {
console.log(err);

View File

@@ -42,7 +42,7 @@ const renderCard = (body: LanyardTypes.Root, params: Parameters): any => {
console.log(Object.keys(body.data.activities).length);
return `
<svg width="400px" height="218px">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400px" height="218px">
<foreignObject>
<div xmlns="http://www.w3.org/1999/xhtml" style="