Blacked and isorted the python files

Prettied and eslinted the typescript/html files
This commit is contained in:
2020-10-11 10:56:29 +05:30
parent b31db593c2
commit d677cfb1ea
505 changed files with 7560 additions and 5650 deletions

View File

@ -1,13 +1,10 @@
import {Injectable} from '@angular/core';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class CookieService {
constructor() {
}
// eslint-disable-next-line class-methods-use-this
public getCookie(name: string) {
const ca: Array<string> = document.cookie.split(';');
const caLen: number = ca.length;
@ -27,10 +24,11 @@ export class CookieService {
this.setCookie(name, '', -1);
}
// eslint-disable-next-line class-methods-use-this
public setCookie(name: string, value: string, expireDays: number, path: string = '') {
const d: Date = new Date();
d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000);
const expires: string = 'expires=' + d.toUTCString();
document.cookie = name + '=' + value + '; ' + expires + (path.length > 0 ? '; path=' + path : '');
const expires = `expires=${d.toUTCString()}`;
document.cookie = `${name}=${value}; ${expires}${path.length > 0 ? `; path=${path}` : ''}`;
}
}