finish database, udp pool
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { client } from '@/client';
|
||||
import { TRPCClientError } from '@trpc/client';
|
||||
|
||||
var bitstream = null;
|
||||
|
||||
@@ -41,9 +42,20 @@ function handleFileChange(event: Event): void {
|
||||
}
|
||||
|
||||
async function uploadBitStream() {
|
||||
const serverStatus = await client.api.status.query();
|
||||
try {
|
||||
const serverStatus = await client.api.status.query();
|
||||
if (serverStatus != "OK") {
|
||||
throw new Error("Server Busy...")
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
if (error instanceof TRPCClientError) {
|
||||
console.error("Can't connect to Server!")
|
||||
} else {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
console.log(serverStatus)
|
||||
}
|
||||
|
||||
function checkFileType(file: File) {
|
||||
|
Reference in New Issue
Block a user