Skip to content

Feat: Sleep Server Endpoint#88

Open
maxonary wants to merge 3 commits into
masterfrom
feat/sleep-server-endpoint
Open

Feat: Sleep Server Endpoint#88
maxonary wants to merge 3 commits into
masterfrom
feat/sleep-server-endpoint

Conversation

@maxonary
Copy link
Copy Markdown
Owner

@maxonary maxonary commented Feb 1, 2026

This pull request adds the ability for authenticated admins to put the Minecraft server into sleep mode from the dashboard. It introduces a new backend endpoint for sleeping the server, updates the admin dashboard UI to include a "Put Server to Sleep" button, and provides feedback to the user about the sleep operation.

Backend: Server sleep functionality

  • Added a new sleepServer controller function in serverStatusController.ts that checks the server status and, if running, triggers the sleep action via the wakeup endpoint. Handles errors and returns appropriate messages.
  • Registered a new admin-only route /api/status/sleep in serverStatusRoutes.ts, protected by authMiddleware, which invokes the new sleep controller.

Frontend: Dashboard enhancements

  • Added state variables (isSleeping, sleepMessage) to Dashboard.tsx to manage sleep operation status and user feedback.
  • Implemented the sleepServer function in Dashboard.tsx to call the backend sleep endpoint, handle errors, and display messages to the user.
  • Updated the dashboard UI to show success/error messages and added a "Put Server to Sleep" button with loading state. [1] [2]

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
convitelist Ready Ready Preview, Comment Feb 1, 2026 0:14am

@maxonary
Copy link
Copy Markdown
Owner Author

maxonary commented Feb 1, 2026

@copilot add back the Get Invitation Code Button

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 1, 2026

@maxonary I've opened a new pull request, #89, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants