Feat: Updating Mods button
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { URLSearchParams } from 'url';
|
||||
import { getContainerStats, streamContainerLogs, readServerProperties, writeServerProperties } from './docker.js';
|
||||
import { getContainerStats, streamContainerLogs, readServerProperties, writeServerProperties, updateMods } from './docker.js';
|
||||
import { checkConnectionStatus, checkGeyserStatus, checkSftpStatus } from './status.js';
|
||||
import { apiRequest } from './api.js';
|
||||
|
||||
@ -481,6 +481,8 @@ export function handleWebSocket(ws, req, docker) {
|
||||
response = client.user === 'Unknown' ? { error: 'User not identified' } : await readServerProperties(docker, client.user);
|
||||
} else if (endpoint === '/server-properties' && method === 'POST' && body && body.content) {
|
||||
response = client.user === 'Unknown' ? { error: 'User not identified' } : await writeServerProperties(docker, client.user, body.content);
|
||||
} else if (endpoint === '/update-mods' && method === 'POST') {
|
||||
response = client.user === 'Unknown' ? { error: 'User not identified' } : await updateMods(docker, client.user);
|
||||
} else {
|
||||
response = await apiRequest(endpoint, client.apiKey, method, body);
|
||||
}
|
||||
|
Reference in New Issue
Block a user