start file saving logic
This commit is contained in:
6
backend/server/dist/index.js
vendored
6
backend/server/dist/index.js
vendored
@ -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)
|
||||
|
@ -78,6 +78,12 @@ io.on("connection", async (socket) => {
|
||||
console.log("file " + file.id + ": ", file.data)
|
||||
callback(file.data)
|
||||
})
|
||||
socket.on("saveFile", (activeId: string, body: string, 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", async (fileId: string, newName: string) => {
|
||||
const file = sandboxFiles.fileData.find((f) => f.id === fileId)
|
||||
if (!file) return
|
||||
|
Reference in New Issue
Block a user