Well it should be a JSON according to the code
Hmm then you got an error?
Is the response just an error?
Ah the reference error is just because of this line: this.db.set("hookID", id);
sorry, getting a little lost in the thread
yeah
Did you do this?
const response = await this.discourse.createHook({
endpoint: this.http.endpoint,
secret,
...webhookPayload,
});
console.log(response);
where did you get that form encoded output
Asked chatgpt
lol
that’s cool, didn’t know it could do that
wtf was the prompt?
methods: {
// Generic activate method used in component-specific hooks
async activate(webhookPayload) {
const secret = this.discourse.generateSecret();
this.db.set("secret", secret);
const response = await this.discourse.createHook({
endpoint: this.http.endpoint,
secret,
...webhookPayload,
});
this.db.set("hookID", id);
},
I added the image and sent this prompt: can you transform this to text
ah ok
that makes way more sense
Thought you asked it to tell you the payload or something
I was about to ![]()
Ah okay, so below the const response = await this.discourse, can you add a console.log(response)?
getting a error | bailing due to observation errors