Giter VIP home page Giter VIP logo

Comments (5)

tfevens avatar tfevens commented on May 19, 2024

NOTE: This looks like an issue with the API itself, not the SDK. Can replicate the behavior using straight API calls.

Seems that the ability to add/remove aliases from the API is not working.

I can send the following payload:

{
	"aliases" : []
}

which results in a 200 response, but the old aliases are still present:

{
  "site": {
    "id": 1402987,
    "server_id": 329730,
    "name": "test1.com",
    "aliases": [
      "test2.com",
      "test3.com"
    ],
    [...]
  }
}

from forge-sdk.

tfevens avatar tfevens commented on May 19, 2024

I went back and re-read the documentation, and my original understanding of it was incorrect.

Currently, the API only supports ADDING aliases, not DELETING. Per the documentation:
Use this endpoint to add additional site aliases...

Submitting an empty array of aliases will have no effect, as you're just telling forge "Add nothing to the aliases."

As it stands, this is working as intended. Perhaps we can use this Issue to add the implementation to delete aliases?

from forge-sdk.

driesvints avatar driesvints commented on May 19, 2024

Feel free to send in a pr, thanks.

from forge-sdk.

tfevens avatar tfevens commented on May 19, 2024

Feel free to send in a pr, thanks.

We can't send in a PR for a function of the API. It's the API that's not removing the aliases, not just the SDK.

from forge-sdk.

thetispro avatar thetispro commented on May 19, 2024

You can delete aliases using Update Site: $forge->updateSite($serverId, $siteId, array $data);

See https://forge.laravel.com/api-documentation#update-site

hth

from forge-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.