Skip to content

Commit

Permalink
var (#81)
Browse files Browse the repository at this point in the history
* var

* const
  • Loading branch information
molleer authored May 6, 2023
1 parent 46a3e3c commit 600ba62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions backend/src/authentication/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Strategy extends passport.Strategy {

_loadProfile(accessToken: string) {
const self = this;
var done = (err: Error | null, profile: any, info: any) => {
const done = (err: Error | null, profile: any, info: any) => {
if (err) {
self.error(err);
return;
Expand All @@ -112,7 +112,7 @@ class Strategy extends passport.Strategy {
self.success(profile, undefined);
};

var verify = (err: Error, user: any) => {
const verify = (err: Error, user: any) => {
if (err) {
self.error(err);
return;
Expand All @@ -124,7 +124,7 @@ class Strategy extends passport.Strategy {
}

_redirectToLogin() {
var uri = new URL(this.options.authorizationURL);
const uri = new URL(this.options.authorizationURL);
uri.searchParams.append("response_type", "code");
uri.searchParams.append("client_id", this.options.clientID);
uri.searchParams.append("redirect_uri", this.options.callbackURL);
Expand Down
6 changes: 3 additions & 3 deletions backend/src/services/rule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const toExplicitRules = (
const explicitRules: ExplicitRule[] = [];

for (const rule_i in rules) {
var current = new Date(from);
let current = new Date(from);
const end = new Date(rules[rule_i].end_date);
while (true) {
if (dayApplies(current, rules[rule_i].day_mask)) {
Expand Down Expand Up @@ -120,7 +120,7 @@ const mergeIntoList = (
};

export const mergeRules = (rules: ExplicitRule[]): ExplicitRule[] => {
var mergedRules: ExplicitRule[] = [];
let mergedRules: ExplicitRule[] = [];
for (const i in rules) {
mergedRules = mergeIntoList(rules[i], mergedRules);
}
Expand All @@ -137,7 +137,7 @@ const doesObeyRules = (rules: rule[], event: Event): Error | null => {
const start = new Date(event.start);
const end = new Date(event.end);

var explicitRules: ExplicitRule[] = mergeRules(
let explicitRules: ExplicitRule[] = mergeRules(
toExplicitRules(rules, start, end),
);
for (const i in explicitRules) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/use-cases/rules/day-mask.element.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "./day-mask.style.css";

const dayArray = day_mask => {
const days = [];
for (var i = 0; i < 7; i++) {
for (let i = 0; i < 7; i++) {
days.push({ value: day_mask % 2, id: i });
day_mask >>= 1;
}
Expand Down

0 comments on commit 600ba62

Please sign in to comment.