Browse Source

fix: #342

tags/v2.1.12
winkidney 2 years ago
parent
commit
b8b9c25624
2 changed files with 8 additions and 1 deletions
  1. +7
    -1
      pinry-spa/src/components/Pins.vue
  2. +1
    -0
      pinry-spa/src/components/editors/PinEditorUI.vue

+ 7
- 1
pinry-spa/src/components/Pins.vue View File

@@ -260,7 +260,13 @@ export default {
} else if (this.pinFilters.userFilter) {
promise = API.fetchPins(this.status.offset, null, this.pinFilters.userFilter, null);
} else if (this.pinFilters.boardFilter) {
promise = API.fetchPins(this.status.offset, null, null, this.pinFilters.boardFilter);
const prevPromise = API.Board.get(this.pinFilters.boardFilter);
promise = prevPromise.then(
(resp) => {
this.editorMeta.currentBoard = resp.data;
return API.fetchPins(this.status.offset, null, null, this.pinFilters.boardFilter);
},
);
} else if (this.pinFilters.idFilter) {
promise = API.fetchPin(this.pinFilters.idFilter);
} else {


+ 1
- 0
pinry-spa/src/components/editors/PinEditorUI.vue View File

@@ -62,6 +62,7 @@ export default {
return this.pin.author === this.currentUsername;
},
inOwnedBoard() {
console.log(this.currentBoard, this.currentUsername);
return (
Object.values(this.currentBoard).length !== 0
&& this.currentBoard.submitter.username === this.currentUsername


Loading…
Cancel
Save