Skip to content

Commit

Permalink
Clear text after submit to make it harder for assholes to vandalize db
Browse files Browse the repository at this point in the history
  • Loading branch information
gtalarico committed Aug 10, 2018
1 parent a55e1c3 commit dfbd510
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Messages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ export default {
postMessage() {
const payload = { subject: this.subject, body: this.msgBody };
this.$backend.$postMessage(payload).then(() => {
this.msgBody = ""
this.subject = ""
this.fetchMessages();
});
},
deleteMsg(msgID) {
this.$backend.$deleteMessage(msgID).then(() => {
deleteMsg(msgId) {
this.$backend.$deleteMessage(msgId).then(() => {
this.messages = this.messages.filter(m => m.pk !== msgId)
this.fetchMessages();
});
}
Expand Down

0 comments on commit dfbd510

Please sign in to comment.