pelican-dev / panel

https://pelican.dev
GNU Affero General Public License v3.0
608 stars 72 forks source link

Servers can not be deleted via API as "Server has a Database" #453

Closed ItzExotical closed 2 days ago

ItzExotical commented 3 days ago

Current Behavior

Just like we can't delete servers with databases in the frontend, the API is unable to. This causes problems when something like the WHMCS module has to terminate a service.

Expected Behavior

The server should be successfully removed, maybe by passing some form of force delete property or something.

Steps to Reproduce

  1. Make a DELETE request to https://{{instance}}/api/application/servers/{{server_id}}
  2. API returns response:

    Array
    (
    [errors] => Array
        (
            [0] => Array
                (
                    [code] => QueryException
                    [status] => 500
                    [detail] => An unexpected error was encountered while processing this request, please try again.
                )
    
        )
    
    [status_code] => 500
    )

Panel Version

1.0.0-beta6

Wings Version

1.0.0-beta3

Games and/or Eggs Affected

All

Docker Image

All

Error Logs

Can't seem to find any panel error logs for today's date.

Is there an existing issue for this?

RMartinOscar commented 3 days ago

Just tried it out, for the front end just need to remove the check and for the api i didn't have any issue, are you sure that you are using latest version ?

ItzExotical commented 3 days ago

Just tried it out, for the front end just need to remove the check and for the api i didn't have any issue, are you sure that you are using latest version ?

Yep, I am. "You are currently using 1.0.0-beta6. Your panel is up-to-date!" Not sure why it does not want to be deleted then.

ItzExotical commented 2 days ago

Issue solved! The database host user details had been changed for some reason. Works now.