@@ -397,19 +397,21 @@ func subscriptionPageHandlerPost(w http.ResponseWriter, r *http.Request) {
397
397
w .WriteHeader (http .StatusAccepted )
398
398
399
399
json .NewEncoder (w ).Encode (& SubscriptionPostSuccessResponse {
400
- Body : SubscriptionPostSuccessResponseBody {
401
- ID : subscription .SubscriptionID ,
402
- Status : subscription .Status ,
403
- Type : subscription .Type ,
404
- Version : subscription .Version ,
405
- Condition : EmptyStruct {},
406
- CreatedAt : subscription .CreatedAt ,
407
- Transport : SubscriptionTransport {
408
- Method : "websocket" ,
409
- SessionID : fmt .Sprintf ("%v_%v" , server .ServerId , clientName ),
410
- ConnectedAt : client .ConnectedAtTimestamp ,
400
+ Data : []SubscriptionPostSuccessResponseBody {
401
+ {
402
+ ID : subscription .SubscriptionID ,
403
+ Status : subscription .Status ,
404
+ Type : subscription .Type ,
405
+ Version : subscription .Version ,
406
+ Condition : EmptyStruct {},
407
+ CreatedAt : subscription .CreatedAt ,
408
+ Transport : SubscriptionTransport {
409
+ Method : "websocket" ,
410
+ SessionID : fmt .Sprintf ("%v_%v" , server .ServerId , clientName ),
411
+ ConnectedAt : client .ConnectedAtTimestamp ,
412
+ },
413
+ Cost : 0 ,
411
414
},
412
- Cost : 0 ,
413
415
},
414
416
Total : 0 ,
415
417
MaxTotalCost : 10 ,
@@ -519,7 +521,7 @@ func handlerResponseErrorUnauthorized(w http.ResponseWriter, message string) {
519
521
func handlerResponseErrorConflict (w http.ResponseWriter , message string ) {
520
522
w .WriteHeader (http .StatusConflict )
521
523
bytes , _ := json .Marshal (& SubscriptionPostErrorResponse {
522
- Error : "Unauthorized " ,
524
+ Error : "Conflict " ,
523
525
Message : message ,
524
526
Status : 409 ,
525
527
})
0 commit comments