Commit Graph

3 Commits (c46fa3c9e560ccf4adc35319559d778482b8aac6)

Author SHA1 Message Date
OpenGnSys Support Team c46fa3c9e5 #980 coding style cleanup
* Curly braces after function definition
* use _dbi_ infix for function name
2020-06-24 13:34:04 +02:00
Roberto Hueso Gómez 3d253e65bc #980 Add GET /scopes REST request
This patch implements HTTP GET /scopes request which returns the scopes
hierarchy:

Request: HTTP GET /scopes
Response: 200 OK
{
  "scope": [
    {
      "name": "Center 1",
      "type": "center",
      "id": 1,
      "scope": [
        {
          "name": "Room 1",
          "type": "room",
          "id": 1,
          "scope": [
            {
              "name": "Computer 1",
              "type": "computer",
              "id": 1,
              "scope": []
            },
            {
              "name": "Computer 3",
              "type": "computer",
              "id": 2,
              "scope": []
            }
          ]
        }
      ]
    }
  ]
}
2020-06-24 13:31:24 +02:00
OpenGnSys Support Team 04ca20e9f1 #971 split into smaller file
Split ogAdmServer into several files:

* sources/rest.c that implements the server REST API.
* sources/client.c that implements the client REST API.
* sources/json.c that provides a few JSON helpers.
2020-06-18 18:46:48 +02:00