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