mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-06 08:43:17 +02:00
fix: Display clean 'Advert sent' message instead of full meshcli output
This commit is contained in:
+7
-1
@@ -613,10 +613,16 @@ def execute_special_command():
|
||||
success, message = cmd_info['function']()
|
||||
|
||||
if success:
|
||||
# Clean up advert message
|
||||
if command == 'advert':
|
||||
clean_message = "Advert sent"
|
||||
else:
|
||||
clean_message = message or f'{command} executed successfully'
|
||||
|
||||
return jsonify({
|
||||
'success': True,
|
||||
'command': command,
|
||||
'message': message or f'{command} executed successfully'
|
||||
'message': clean_message
|
||||
}), 200
|
||||
else:
|
||||
return jsonify({
|
||||
|
||||
Reference in New Issue
Block a user