delete conn on cloud, save file to cloud WIP

This commit is contained in:
SPRINX0\prochazka
2025-05-27 16:46:53 +02:00
parent 74560c3289
commit d3a5df0007
3 changed files with 91 additions and 5 deletions

View File

@@ -190,4 +190,21 @@ module.exports = {
const respPut = await putCloudContent(folid, undefined, JSON.stringify(conn2), conn2.displayName, 'connection');
return respPut;
},
deleteConnection_meta: true,
async deleteConnection({ conid }) {
const m = conid.match(/^cloud\:\/\/(.+)\/(.+)$/);
if (!m) {
throw new Error('Invalid cloud connection ID format');
}
const folid = m[1];
const cntid = m[2];
const resp = await callCloudApiPost(`content/delete/${folid}/${cntid}`);
socket.emitChanged('cloud-content-changed');
socket.emit('cloud-content-updated');
return resp;
},
// saveFile_meta: true,
// async saveFile({folid, file, data, folder, format})
};