Skip to content
Snippets Groups Projects
Commit 9d30dda7 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Codestyle

parent b3f34648
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,14 @@ class JobStatusNotifier { ...@@ -7,13 +7,14 @@ class JobStatusNotifier {
let filteredPatch; let filteredPatch;
let jobId; let jobId;
let match; let match;
let operation;
let re; let re;
re = new RegExp(`^/users/${this.userId}/jobs/([A-Za-z0-9]*)/status$`) re = new RegExp(`^/users/${this.userId}/jobs/([A-Za-z0-9]*)/status$`)
filteredPatch = patch filteredPatch = patch
.filter(operation => operation.op === 'replace') .filter(operation => operation.op === 'replace')
.filter(operation => re.test(operation.path)); .filter(operation => re.test(operation.path));
for (let operation of filteredPatch) { for (operation of filteredPatch) {
[match, jobId] = operation.path.match(re); [match, jobId] = operation.path.match(re);
app.flash(`[<a href="/jobs/${jobId}">${app.users[this.userId].jobs[jobId].title}</a>] New status: ${operation.value}`, 'job'); app.flash(`[<a href="/jobs/${jobId}">${app.users[this.userId].jobs[jobId].title}</a>] New status: ${operation.value}`, 'job');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment