enh: make clone function use ocs

Signed-off-by: grnd-alt <git@belakkaf.net>
This commit is contained in:
grnd-alt
2024-12-19 14:05:32 +01:00
parent 22bb8d65e9
commit 60b7357ef4
3 changed files with 6 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
*/
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { generateOcsUrl, generateUrl } from '@nextcloud/router'
export class CardApi {
@@ -29,7 +29,7 @@ export class CardApi {
}
cloneCard(cardId, targetStackId) {
return axios.post(this.url(`/cards/${cardId}/clone`), {
return axios.post(generateOcsUrl(`apps/deck/api/v1.0/cards/${cardId}/clone`), {
targetStackId,
})
.then(