Skip to content
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

Merged
merged 10 commits into from
Apr 6, 2017
Merged

ES6: migrated "client" #976

merged 10 commits into from
Apr 6, 2017

Conversation

herrmannplatz
Copy link
Contributor

No description provided.

window.z.client = z.client || {};

z.client.ClientMapper = class ClientMapper {

Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obsolete line of code

z.client.ClientMapper = class ClientMapper {

constructor() {
}
Copy link
Contributor

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?

return this.client.send_json({
url: this.client.create_url(`${z.client.ClientService.URL_CLIENTS}/${client_id}`),
type: 'DELETE',
data: {}});
Copy link
Contributor

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) {
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

; (From Travis ❌ )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💩

@lipis lipis mentioned this pull request Apr 5, 2017
79 tasks
@lipis lipis changed the title ES6: migrated "clients" ES6: migrated "client" Apr 5, 2017
@herrmannplatz herrmannplatz merged commit bf3b69d into dev Apr 6, 2017
@herrmannplatz herrmannplatz deleted the clients branch April 6, 2017 13:47
herrmannplatz pushed a commit that referenced this pull request Apr 6, 2017
This reverts commit bf3b69t d3b3d8b2180c47fd0b25fe0fe405f7c63e.
herrmannplatz pushed a commit that referenced this pull request Apr 6, 2017
herrmannplatz added a commit that referenced this pull request Apr 10, 2017
herrmannplatz pushed a commit that referenced this pull request Apr 10, 2017
This reverts commit bf3b69t d3b3d8b2180c47fd0b25fe0fe405f7c63e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants