Skip to content

Conversation

@konard
Copy link
Contributor

@konard konard commented Oct 29, 2025

Summary

This PR fixes the endpoint configuration issues reported in #24:

Changes Made

  1. Fixed /api/v1/settings/shift-config endpoint method

    • Changed from POST to PUT to match REST conventions for updating resources
    • This fixes the error: "The POST method is not supported for route api/v1/settings/shift-config. Supported methods: GET, HEAD, PUT."
  2. Removed /api/v1/settings/bot-config endpoints

    • Removed GET /api/v1/settings/bot-config route
    • Removed POST /api/v1/settings/bot-config route
    • Removed getBotConfig() and updateBotConfig() methods from SettingsController
    • Bot configuration now uses the shift configuration endpoints as bots work with dealership shifts
  3. Updated API documentation

    • Updated swagger.yaml to reflect the changes
    • Changed shift-config endpoint from POST to PUT in OpenAPI spec
    • Removed all bot-config endpoint documentation

Files Changed

  • routes/api.php - Updated endpoint routes
  • app/Http/Controllers/Api/V1/SettingsController.php - Removed bot-config methods
  • swagger.yaml - Updated API documentation

Testing

The changes ensure that:

  • Settings can be properly saved using PUT /api/v1/settings/shift-config
  • Bot-related endpoints are removed as requested
  • API documentation matches the actual implementation

Fixes #24


🤖 Generated with Claude Code

konard and others added 2 commits October 29, 2025 16:50
Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
- Change POST to PUT for /api/v1/settings/shift-config endpoint to match REST conventions
- Remove /api/v1/settings/bot-config endpoints as bot configuration now uses shift-config
- Update swagger.yaml to reflect endpoint changes (PUT instead of POST for shift-config)
- Remove bot-config related code from SettingsController

Fixes xierongchuan#24

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Правка эндпоинтов Fix endpoint configuration for settings Oct 29, 2025
@konard konard marked this pull request as ready for review October 29, 2025 15:55
@konard
Copy link
Contributor Author

konard commented Oct 29, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (321KB)
🔗 View complete solution draft log


Now working session is ended, feel free to review and add any feedback on the solution draft.

@xierongchuan xierongchuan merged commit fc72973 into xierongchuan:main Oct 29, 2025
3 checks passed
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

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