Skip to content

Commit

Permalink
Fix API key rows not being displayed
Browse files Browse the repository at this point in the history
The keyword `this` is not available when using `() => {}` notation instead of `function() {}`...

This is a regression introduced in #768. Thanks @msymons for spotting it!

Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Mar 11, 2024
1 parent f7ce26c commit 80d7ec4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ export default {
EditApiKeyCommentModal,
},
computed: {
keyId: () => {
keyId: function () {
return MurmurHash2(this.apiKey.key).result();
},
comment: () => {
comment: function () {
return this.apiKey.comment ? this.apiKey.comment : 'No comment';
},
createdTimestamp: () => {
createdTimestamp: function () {
return this.apiKey.created
? common.formatTimestamp(this.apiKey.created, true)
: 'N/A';
},
lastUsedTimestamp: () => {
lastUsedTimestamp: function () {
return this.apiKey.lastUsed
? common.formatTimestamp(this.apiKey.lastUsed, true)
: 'N/A';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
this.comment = this.apiKey.comment;
},
methods: {
updateComment: () => {
updateComment: function () {
this.axios
.post(
`${this.$api.BASE_URL}/${this.$api.URL_TEAM}/key/${this.apiKey.key}/comment`,
Expand All @@ -70,7 +70,7 @@ export default {
);
});
},
resetValues: () => {
resetValues: function () {
this.comment = null;
},
},
Expand Down

0 comments on commit 80d7ec4

Please sign in to comment.