feat: add api endpoint and UI to transfer a board to a different user
Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
committed by
Julius Härtl
parent
3a4ec07103
commit
bf9a51d167
@@ -26,7 +26,7 @@ import { loadState } from '@nextcloud/initial-state'
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
import { generateOcsUrl, generateUrl } from '@nextcloud/router'
|
||||
import { BoardApi } from '../services/BoardApi'
|
||||
import actions from './actions'
|
||||
import stack from './stack'
|
||||
@@ -486,5 +486,11 @@ export default new Vuex.Store({
|
||||
dispatch('loadBoardById', acl.boardId)
|
||||
})
|
||||
},
|
||||
async transferOwnership({ commit }, { boardId, owner, newOwner }) {
|
||||
await axios.put(generateUrl(`apps/deck/boards/${boardId}/transferOwner`), {
|
||||
owner,
|
||||
newOwner,
|
||||
})
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user