Skip to content

Commit

Permalink
ready for the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
YankiBaras authored and LEVI-RIVKIN committed Mar 7, 2024
1 parent 2a660ce commit 717e30d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "/tsconfig.json"
"project": "**/tsconfig.json"
},
"rules": {
"no-console": "off",
Expand Down
12 changes: 6 additions & 6 deletions backend/src/repository/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ interface Settings {

// Method to get settings from Redis
export async function getSettings(): Promise<Settings> {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const settingsJson: any = await client.json.get('settings');
if (settingsJson) {
return settingsJson;
} else {
// If settings not found, return default settings
return {
isRoundTripEnabled: false,
rideTimeRestriction: 24
};
}
// If settings not found, return default settings
return {
isRoundTripEnabled: false,
rideTimeRestriction: 24
};
}

// Method to set or update settings in Redis
Expand Down
4 changes: 2 additions & 2 deletions client/src/Client/pages/Passenger/OrderRide/OrderRide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ const OrderRide = () => {
const settingsCall = async () => {
const settingsData = await api.settings.settingsGet();
if (settingsData) {
const settings = {
const newSettings = {
isRoundTripEnabled: settingsData.isRoundTripEnabled ?? false,
rideTimeRestriction: settingsData.rideTimeRestriction || 0
};
setSettings(settings);
setSettings(newSettings);
}
};
settingsCall();
Expand Down

0 comments on commit 717e30d

Please sign in to comment.