Upload refactor #242

Merged
bones7242 merged 24 commits from upload-refactor into master 2017-11-13 21:39:21 +01:00
bones7242 commented 2017-11-06 18:02:08 +01:00 (Migrated from github.com)
  • removed socket.io
  • updated client side upload process to use form data submission to spee.ch's publish api
  • consolidated client-side publish and validation functions into objects so they would be out of the global scope
  • updated the File record creation on the publish API to include the channel name in the File record if applicable
  • updated the error handling code on the back end to better return the specific error to the client
- removed socket.io - updated client side upload process to use form data submission to spee.ch's publish api - consolidated client-side publish and validation functions into objects so they would be out of the global scope - updated the File record creation on the publish API to include the channel name in the File record if applicable - updated the error handling code on the back end to better return the specific error to the client
kauffj (Migrated from github.com) requested changes 2017-11-10 18:37:40 +01:00
kauffj (Migrated from github.com) left a comment

Feedback.

Feedback.
kauffj (Migrated from github.com) commented 2017-11-10 18:25:46 +01:00

@lyoshenka I gather best practices re: API documentation have evolved. Should @billbitt consider swagger or something else to document these calls?

(May be out of scope for this PR and should instead be opened separately)

@lyoshenka I gather best practices re: API documentation have evolved. Should @billbitt consider swagger or something else to document these calls? (May be out of scope for this PR and should instead be opened separately)
kauffj (Migrated from github.com) commented 2017-11-10 18:26:47 +01:00

Why call this then if skipAuth is true?

Why call this then if `skipAuth` is true?
kauffj (Migrated from github.com) commented 2017-11-10 18:24:47 +01:00

A more common convention for this is probably speechConfig.example.js or speechConfig.js.example.

A more common convention for this is probably `speechConfig.example.js` or `speechConfig.js.example`.
@ -25,2 +30,2 @@
logger.debug('channel for publish not found in Channel table');
};
channelName = channel.channelName;
}
kauffj (Migrated from github.com) commented 2017-11-10 18:28:28 +01:00

Missing let?

Missing `let`?
kauffj (Migrated from github.com) commented 2017-11-10 18:30:43 +01:00

[error, message] = this.returnErrorMessageAndStatus(error)

Prob worth spending some time reading/learning on ES2016 destructuring as well as spread operators.

[error, message] = this.returnErrorMessageAndStatus(error) Prob worth spending some time reading/learning on ES2016 destructuring as well as spread operators.
kauffj (Migrated from github.com) commented 2017-11-10 18:30:58 +01:00

same as above

same as above
kauffj (Migrated from github.com) commented 2017-11-10 18:33:00 +01:00

Presumably const

Presumably `const`
kauffj (Migrated from github.com) commented 2017-11-10 18:33:35 +01:00

Late on catching this one, but this function name doesn't imply it is redirecting me to the homepage.

Late on catching this one, but this function name doesn't imply it is redirecting me to the homepage.
bones7242 (Migrated from github.com) reviewed 2017-11-13 18:13:06 +01:00
bones7242 (Migrated from github.com) commented 2017-11-13 18:13:06 +01:00

good point. I was struggling with how to best do this in the promise chain, but I now abstracted this to its own function

good point. I was struggling with how to best do this in the promise chain, but I now abstracted this to its own function
bones7242 (Migrated from github.com) reviewed 2017-11-13 20:25:03 +01:00
bones7242 (Migrated from github.com) commented 2017-11-13 20:25:03 +01:00

I like speechConfig.js.example

I like `speechConfig.js.example`
bones7242 (Migrated from github.com) reviewed 2017-11-13 20:26:24 +01:00
@ -25,2 +30,2 @@
logger.debug('channel for publish not found in Channel table');
};
channelName = channel.channelName;
}
bones7242 (Migrated from github.com) commented 2017-11-13 20:26:24 +01:00

defined on line 9 to hoist and make available further down promise chain

defined on line 9 to hoist and make available further down promise chain
bones7242 (Migrated from github.com) reviewed 2017-11-13 21:38:49 +01:00
bones7242 (Migrated from github.com) commented 2017-11-13 21:38:49 +01:00

I'll discuss with @lyoshenka and open separate PR for needed changes

I'll discuss with @lyoshenka and open separate PR for needed changes
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/spee.ch#242
No description provided.