chore(frontend): fixed all eslint errors

This commit is contained in:
akhilmhdh
2023-01-17 21:06:14 +05:30
parent 9f82e2d836
commit cf7834bfc3
184 changed files with 6255 additions and 6117 deletions
@@ -1,4 +1,4 @@
import SecurityClient from '~/utilities/SecurityClient';
import SecurityClient from '@app/components/utilities/SecurityClient';
/**
* This route registers a certain action for a user
@@ -6,13 +6,12 @@ import SecurityClient from '~/utilities/SecurityClient';
* @param {*} workspaceId
* @returns
*/
const checkUserAction = ({ action }: { action: string }) => {
return SecurityClient.fetchCall(
'/api/v1/user-action' +
'?' +
new URLSearchParams({
const checkUserAction = ({ action }: { action: string }) =>
SecurityClient.fetchCall(
`/api/v1/user-action` +
`?${new URLSearchParams({
action
}),
})}`,
{
method: 'GET',
headers: {
@@ -20,12 +19,11 @@ const checkUserAction = ({ action }: { action: string }) => {
}
}
).then(async (res) => {
if (res && res.status == 200) {
if (res && res.status === 200) {
return (await res.json()).userAction;
} else {
console.log('Failed to check a user action');
}
console.log('Failed to check a user action');
return undefined;
});
};
export default checkUserAction;
@@ -1,12 +1,12 @@
import SecurityClient from '~/utilities/SecurityClient';
import SecurityClient from '@app/components/utilities/SecurityClient';
/**
* This route registers a certain action for a user
* @param {*} action
* @returns
*/
const registerUserAction = ({ action }: { action: string }) => {
return SecurityClient.fetchCall('/api/v1/user-action', {
const registerUserAction = ({ action }: { action: string }) =>
SecurityClient.fetchCall('/api/v1/user-action', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -15,12 +15,11 @@ const registerUserAction = ({ action }: { action: string }) => {
action
})
}).then(async (res) => {
if (res && res.status == 200) {
if (res && res.status === 200) {
return res;
} else {
console.log('Failed to register a user action');
}
console.log('Failed to register a user action');
return undefined;
});
};
export default registerUserAction;