0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Added source to beta editor feedback (#17586)

no refs
- will return post, page, or settings
This commit is contained in:
Steve Larson 2023-08-03 10:10:31 -05:00 committed by GitHub
parent f26203f8cb
commit af7ce52708
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,9 +18,11 @@ export default class FeedbackLexicalSendButtonComponent extends Component {
@task({drop: true})
*submitFeedback() {
let url = `https://submit-form.com/us6uBWv8`;
let source;
let postData;
if (this.args?.post) {
source = this.args?.post?.isPost ? 'Post' : 'Page';
postData = {
PostId: this.args.post?.id,
PostTitle: this.args.post?.title
@ -40,7 +42,8 @@ export default class FeedbackLexicalSendButtonComponent extends Component {
let data = {
...ghostData,
...postData
...postData,
Source: source || 'Settings'
};
let response = yield this.ajax.post(url, {data});