-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6: migrated "client" #976
Conversation
app/script/client/ClientMapper.js
Outdated
window.z.client = z.client || {}; | ||
|
||
z.client.ClientMapper = class ClientMapper { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No empty line
.then(clients => { | ||
return clients | ||
.filter((client) => (z.client.Client.dismantle_user_client_id(client.meta.primary_key)).user_id === user_id) | ||
.map((client) => client); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obsolete line of code
app/script/client/ClientMapper.js
Outdated
z.client.ClientMapper = class ClientMapper { | ||
|
||
constructor() { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need an empty constructor
?
app/script/client/ClientService.js
Outdated
return this.client.send_json({ | ||
url: this.client.create_url(`${z.client.ClientService.URL_CLIENTS}/${client_id}`), | ||
type: 'DELETE', | ||
data: {}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this.client.send_json({
url: this.client.create_url(`${z.client.ClientService.URL_CLIENTS}/${client_id}`),
type: 'DELETE',
data: {},
});
device_model = `${device_model} (Internal)`; | ||
} | ||
} else { | ||
if (client_type === z.client.ClientType.TEMPORARY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be combined else if
return this.client_service.load_all_clients_from_db() | ||
.then(clients => { | ||
return clients.filter((client) => { | ||
return (z.client.Client.dismantle_user_client_id(client.meta.primary_key)).user_id === user_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;
(From Travis ❌ )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💩
This reverts commit bf3b69t d3b3d8b2180c47fd0b25fe0fe405f7c63e.
This reverts commit 1f08296.
This reverts commit bf3b69t d3b3d8b2180c47fd0b25fe0fe405f7c63e.
No description provided.