start file saving logic

This commit is contained in:
Ishaan Dey
2024-04-27 16:41:25 -04:00
parent d941e2c056
commit d6769f3407
3 changed files with 40 additions and 1 deletions

View File

@ -73,6 +73,12 @@ io.on("connection", (socket) => __awaiter(void 0, void 0, void 0, function* () {
console.log("file " + file.id + ": ", file.data);
callback(file.data);
});
socket.on("saveFile", (activeId, body, callback) => {
// const file = sandboxFiles.fileData.find((f) => f.id === fileId)
// if (!file) return
// console.log("file " + file.id + ": ", file.data)
// callback(file.data)
});
socket.on("renameFile", (fileId, newName) => __awaiter(void 0, void 0, void 0, function* () {
const file = sandboxFiles.fileData.find((f) => f.id === fileId);
if (!file)