fix(dashboard): replace self-calling restart logic with standalone endpoint#259
Merged
Akinator31 merged 1 commit intomainfrom Nov 27, 2025
Merged
fix(dashboard): replace self-calling restart logic with standalone endpoint#259Akinator31 merged 1 commit intomainfrom
Akinator31 merged 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the bot start/stop logic in the API to centralize the implementation, simplify handler code, and remove unused internal token-based API calls. The main changes include extracting bot lifecycle management into reusable functions, updating handlers to use these new utilities, and cleaning up unused code and fields.
Bot lifecycle management refactor:
start_botandstop_botutility functions inrustmail/src/api/utils/bot.rs, along withStartBotResponseandStopBotResponseenums to standardize responses.handle_start_bot,handle_stop_bot, andhandle_restart_bothandlers to use the new utility functions, simplifying their logic and improving maintainability.rustmail/src/api/utils/mod.rs.Removal of internal token logic and related code:
internal_tokenfield fromBotStateand its initialization, as well as related token generation code inrustmail/src/bot.rsandrustmail/src/types/bot.rs.ping_internalutility and its module export.auth_middlewareby removing internal token checks and associated imports.These changes make the bot API more modular and easier to maintain, while removing unused or redundant logic.