Linting
This commit is contained in:
@@ -45,35 +45,29 @@ export class TellYourStoryPage {
|
||||
}
|
||||
|
||||
saveUserSubmission(event) {
|
||||
var fileInput = document.querySelector('.file-input');
|
||||
|
||||
// Setup submission for insert
|
||||
var submission = {
|
||||
profile: {
|
||||
details: {
|
||||
name: this.userSubmissionForm.value.name,
|
||||
email: this.userSubmissionForm.value.email,
|
||||
about: this.userSubmissionForm.value.about,
|
||||
location: this.userSubmissionForm.value.location
|
||||
},
|
||||
messages: [
|
||||
{
|
||||
text: "What is your your experience dating in the LGBT community?",
|
||||
isUser: false,
|
||||
timestamp: (Date.now() - 900000)
|
||||
},
|
||||
{
|
||||
text: this.userSubmissionForm.value.messages,
|
||||
isUser: true,
|
||||
timestamp: Date.now()
|
||||
}
|
||||
],
|
||||
submitted: true
|
||||
var submission: any = {};
|
||||
submission.image = this.fileInput.files[0];
|
||||
submission.profile = JSON.stringify({
|
||||
details: {
|
||||
name: this.userSubmissionForm.value.name,
|
||||
email: this.userSubmissionForm.value.email,
|
||||
about: this.userSubmissionForm.value.about,
|
||||
location: this.userSubmissionForm.value.location
|
||||
},
|
||||
image: this.fileInput.files[0],
|
||||
};
|
||||
|
||||
submission.profile = JSON.stringify(submission.profile);
|
||||
messages: [
|
||||
{
|
||||
text: "What is your your experience dating in the LGBT community?",
|
||||
isUser: false,
|
||||
timestamp: (Date.now() - 900000)
|
||||
},
|
||||
{
|
||||
text: this.userSubmissionForm.value.messages,
|
||||
isUser: true,
|
||||
timestamp: Date.now()
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
this.profileService.doProfileSubmission(submission,
|
||||
function (data) {
|
||||
|
||||
@@ -68,7 +68,7 @@ export class ProfileService {
|
||||
);
|
||||
}
|
||||
|
||||
doProfileSubmission(submission, success = false, failure = false) {
|
||||
doProfileSubmission(submission, success: any = false, failure: any = false) {
|
||||
success = success || function (data) {
|
||||
console.debug('doProfileSubmission Success', data);
|
||||
};
|
||||
@@ -77,7 +77,7 @@ export class ProfileService {
|
||||
console.error('doProfileSubmission Error', data, status);
|
||||
};
|
||||
|
||||
var httpOptions = {
|
||||
var httpOptions: any = {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user