Skip to content

Commit

Permalink
fix(frontend): πŸ› users without token no longer cause error on scan (#344
Browse files Browse the repository at this point in the history
)
  • Loading branch information
PhantomMantis committed Apr 6, 2024
1 parent 7e6c577 commit 05ce4f5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export default defineComponent({
},
data() {
return {
profilePicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username[0],
backupPicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username[0],
profilePicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username,
backupPicture: "https://ui-avatars.com/api/?uppercase=true&name=" + this.user.username,
disabled: {
delete: false,
},
Expand Down Expand Up @@ -103,6 +103,9 @@ export default defineComponent({
},
methods: {
async getProfilePicture() {
if (!this.user.username) {
return;
}
const response = this.$axios.get(`/api/users/${this.user.token}/profile-picture`, {
responseType: "blob",
});
Expand Down

0 comments on commit 05ce4f5

Please sign in to comment.