Skip to content

Commit

Permalink
Use es6 syntactical sugar
Browse files Browse the repository at this point in the history
  • Loading branch information
dejan9393 committed Apr 15, 2021
1 parent 4322309 commit 99c0119
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gitlabcache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ export class GitlabCache {
private ttl: number;
private storage: NodeCache;

public static get DEFAULT_TTL() {
return 300;
}
public static readonly DEFAULT_TTL = 300;

private static _generateKeyHash(username: string, password: string) {
const sha = Crypto.createHash('sha256');
sha.update(JSON.stringify({ username: username, password: password }));
sha.update(JSON.stringify({ username, password }));
return sha.digest('hex');
}

Expand Down

0 comments on commit 99c0119

Please sign in to comment.