flood: rearrange, remove misc files and reformat

This commit is contained in:
Jesse Chan
2020-11-15 22:54:36 +08:00
parent ba23f0166e
commit 1a878d5423
86 changed files with 700 additions and 917 deletions

View File

@@ -85,7 +85,11 @@ export default async (req: Request<unknown, unknown, unknown, {historySnapshot:
if (error == null && snapshot != null && lastTimestamp != null) {
serverEvent.emit(lastTimestamp, 'TRANSFER_HISTORY_FULL_UPDATE', snapshot);
} else {
const fallbackHistory: TransferHistory = {download: [0], upload: [0], timestamps: [Date.now()]};
const fallbackHistory: TransferHistory = {
download: [0],
upload: [0],
timestamps: [Date.now()],
};
serverEvent.emit(Date.now(), 'TRANSFER_HISTORY_FULL_UPDATE', fallbackHistory);
}
});