Refactor API to remove active status filtering and add song management functionality also remove the uneeded auth check in the get towers route
This commit is contained in:
parent
fd80051d9e
commit
892eafdac4
9 changed files with 130 additions and 198 deletions
|
@ -50,7 +50,6 @@ Creates a new radio station and returns an owner token.
|
|||
"ownerId": "owner-uuid",
|
||||
"joinCode": "ABC123",
|
||||
"createdAt": "2025-08-01T10:00:00",
|
||||
"active": true,
|
||||
"connectedClients": []
|
||||
},
|
||||
"ownerToken": "jwt-token-here",
|
||||
|
@ -63,11 +62,7 @@ Creates a new radio station and returns an owner token.
|
|||
|
||||
Retrieves all radio stations. Requires authentication.
|
||||
|
||||
**Endpoint:** `GET /radio-stations?activeOnly=true`
|
||||
|
||||
**Query Parameters:**
|
||||
|
||||
- `activeOnly` (boolean, default: false): Filter to only active stations
|
||||
**Endpoint:** `GET /radio-stations`
|
||||
|
||||
**Response:**
|
||||
|
||||
|
@ -83,7 +78,6 @@ Retrieves all radio stations. Requires authentication.
|
|||
"ownerId": "owner-uuid",
|
||||
"joinCode": "ABC123",
|
||||
"createdAt": "2025-08-01T10:00:00",
|
||||
"active": true,
|
||||
"connectedClients": []
|
||||
}
|
||||
]
|
||||
|
@ -109,7 +103,6 @@ Retrieves a specific radio station. Requires authentication.
|
|||
"ownerId": "owner-uuid",
|
||||
"joinCode": "ABC123",
|
||||
"createdAt": "2025-08-01T10:00:00",
|
||||
"active": true,
|
||||
"connectedClients": []
|
||||
}
|
||||
}
|
||||
|
@ -169,8 +162,7 @@ Connects a client to a radio station using a join code. No authentication requir
|
|||
"id": "client-uuid",
|
||||
"username": "john_doe",
|
||||
"radioStationId": "station-uuid",
|
||||
"connectedAt": "2025-08-01T10:00:00",
|
||||
"active": true
|
||||
"connectedAt": "2025-08-01T10:00:00"
|
||||
},
|
||||
"clientToken": "jwt-token-here",
|
||||
"message": "Successfully connected to radio station. Use this token for further requests."
|
||||
|
@ -211,7 +203,7 @@ curl -X POST http://localhost:8080/api/clients/connect \
|
|||
### Getting All Stations (with authentication)
|
||||
|
||||
```bash
|
||||
curl -X GET "http://localhost:8080/api/radio-stations?activeOnly=true" \
|
||||
curl -X GET "http://localhost:8080/api/radio-stations" \
|
||||
-H "Authorization: Bearer {token}"
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue