Fixed bug with value parsing if custom icon was used

This commit is contained in:
Paweł Malak 2021-11-19 14:06:38 +01:00
parent c2e9f82cd6
commit d13b890e16
4 changed files with 4 additions and 4 deletions

View file

@ -61,7 +61,7 @@ export const AppForm = ({ app, modalHandler }: Props): JSX.Element => {
} }
data.append('name', formData.name); data.append('name', formData.name);
data.append('url', formData.url); data.append('url', formData.url);
data.append('isPublic', `${formData.isPublic}`); data.append('isPublic', `${formData.isPublic ? 1 : 0}`);
return data; return data;
}; };

View file

@ -77,7 +77,7 @@ export const BookmarksForm = ({
data.append('name', formData.name); data.append('name', formData.name);
data.append('url', formData.url); data.append('url', formData.url);
data.append('categoryId', `${formData.categoryId}`); data.append('categoryId', `${formData.categoryId}`);
data.append('isPublic', `${formData.isPublic}`); data.append('isPublic', `${formData.isPublic ? 1 : 0}`);
return data; return data;
}; };

View file

@ -1,4 +1,4 @@
export const applyAuth = () => { export const applyAuth = () => {
const token = localStorage.getItem('token') || ''; const token = localStorage.getItem('token') || '';
return { Authorization_Flame: `Bearer ${token}` }; return { 'Authorization-Flame': `Bearer ${token}` };
}; };

View file

@ -1,7 +1,7 @@
const jwt = require('jsonwebtoken'); const jwt = require('jsonwebtoken');
const auth = (req, res, next) => { const auth = (req, res, next) => {
const authHeader = req.header('Authorization_Flame'); const authHeader = req.header('Authorization-Flame');
let token; let token;
let tokenIsValid = false; let tokenIsValid = false;