|
|
@ -132,8 +132,8 @@ export const put = (sector: DataSector, key: NID, data: AssFile | AssUser): Prom
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
// ? SQL
|
|
|
|
// ? SQL
|
|
|
|
// todo: check existing
|
|
|
|
if (!(await MySql.get('assfiles', key))) await MySql.put('assfiles', key, data);
|
|
|
|
await MySql.put('assfiles', key, data);
|
|
|
|
else return reject(new Error(`File key ${key} already exists`))
|
|
|
|
|
|
|
|
|
|
|
|
// todo: modify users SQL files property
|
|
|
|
// todo: modify users SQL files property
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -156,8 +156,8 @@ export const put = (sector: DataSector, key: NID, data: AssFile | AssUser): Prom
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
// ? SQL
|
|
|
|
// ? SQL
|
|
|
|
// todo: check existing
|
|
|
|
if (!(await MySql.get('assusers', key))) await MySql.put('assusers', key, data);
|
|
|
|
await MySql.put('assusers', key, data);
|
|
|
|
else return reject(new Error(`User key ${key} already exists`));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|