style(api): standardize formatting and remove trailing newlines in API definitions
This commit is contained in:
@@ -10,7 +10,6 @@ info (
|
||||
|
||||
import "../types.api"
|
||||
|
||||
|
||||
@server (
|
||||
prefix: v1/public/announcement
|
||||
group: public/announcement
|
||||
@@ -20,5 +19,4 @@ service ppanel {
|
||||
@doc "Query announcement"
|
||||
@handler QueryAnnouncement
|
||||
get /list (QueryAnnouncementRequest) returns (QueryAnnouncementResponse)
|
||||
}
|
||||
|
||||
}
|
||||
+14
-15
@@ -1,28 +1,27 @@
|
||||
syntax = "v1"
|
||||
|
||||
info(
|
||||
title: "Document API"
|
||||
desc: "API for ppanel"
|
||||
author: "Tension"
|
||||
email: "tension@ppanel.com"
|
||||
version: "0.0.1"
|
||||
title: "Document API"
|
||||
desc: "API for ppanel"
|
||||
author: "Tension"
|
||||
email: "tension@ppanel.com"
|
||||
version: "0.0.1"
|
||||
)
|
||||
|
||||
import "../types.api"
|
||||
|
||||
|
||||
@server (
|
||||
prefix: v1/public/document
|
||||
group: public/document
|
||||
middleware: AuthMiddleware
|
||||
prefix: v1/public/document
|
||||
group: public/document
|
||||
middleware: AuthMiddleware
|
||||
)
|
||||
|
||||
service ppanel {
|
||||
@doc "Get document list"
|
||||
@handler QueryDocumentList
|
||||
get /list returns (QueryDocumentListResponse)
|
||||
@doc "Get document list"
|
||||
@handler QueryDocumentList
|
||||
get /list returns (QueryDocumentListResponse)
|
||||
|
||||
@doc "Get document detail"
|
||||
@handler QueryDocumentDetail
|
||||
get /detail (QueryDocumentDetailRequest) returns (Document)
|
||||
@doc "Get document detail"
|
||||
@handler QueryDocumentDetail
|
||||
get /detail (QueryDocumentDetailRequest) returns (Document)
|
||||
}
|
||||
@@ -47,5 +47,4 @@ service ppanel {
|
||||
@doc "Get order list"
|
||||
@handler QueryOrderList
|
||||
get /list (QueryOrderListRequest) returns (QueryOrderListResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@ info (
|
||||
|
||||
import "../types.api"
|
||||
|
||||
|
||||
@server (
|
||||
prefix: v1/public/payment
|
||||
group: public/payment
|
||||
@@ -20,5 +19,4 @@ service ppanel {
|
||||
@doc "Get available payment methods"
|
||||
@handler GetAvailablePaymentMethods
|
||||
get /methods returns (GetAvailablePaymentMethodsResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,7 @@ type (
|
||||
SubscribeId int64 `json:"subscribe_id"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
InviteCode string `json:"invite_code,omitempty"`
|
||||
InviteCode string `json:"invite_code,omitempty"`
|
||||
TurnstileToken string `json:"turnstile_token,omitempty"`
|
||||
}
|
||||
PortalPurchaseResponse {
|
||||
@@ -29,7 +29,7 @@ type (
|
||||
List []Subscribe `json:"list"`
|
||||
}
|
||||
PrePurchaseOrderRequest {
|
||||
Payment int64 `json:"payment,omitempty"`
|
||||
Payment int64 `json:"payment,omitempty"`
|
||||
SubscribeId int64 `json:"subscribe_id"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Coupon string `json:"coupon,omitempty"`
|
||||
@@ -92,5 +92,4 @@ service ppanel {
|
||||
@doc "Purchase Checkout"
|
||||
@handler PurchaseCheckout
|
||||
post /order/checkout (CheckoutOrderRequest) returns (CheckoutOrderResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ info (
|
||||
)
|
||||
|
||||
import "../types.api"
|
||||
|
||||
|
||||
@server (
|
||||
prefix: v1/public/subscribe
|
||||
group: public/subscribe
|
||||
@@ -27,5 +27,4 @@ service ppanel {
|
||||
@doc "Get application config"
|
||||
@handler QueryApplicationConfig
|
||||
get /application/config returns (ApplicationResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,10 +11,9 @@ info (
|
||||
import "../types.api"
|
||||
|
||||
type (
|
||||
|
||||
GetUserTicketListResponse {
|
||||
Total int64 `json:"total"`
|
||||
List []Ticket `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
List []Ticket `json:"list"`
|
||||
}
|
||||
CreateUserTicketRequest {
|
||||
Title string `json:"title"`
|
||||
@@ -34,10 +33,10 @@ type (
|
||||
Status *uint8 `json:"status" validate:"required"`
|
||||
}
|
||||
CreateUserTicketFollowRequest {
|
||||
TicketId int64 `json:"ticket_id"`
|
||||
From string `json:"from"`
|
||||
Type uint8 `json:"type"`
|
||||
Content string `json:"content"`
|
||||
TicketId int64 `json:"ticket_id"`
|
||||
From string `json:"from"`
|
||||
Type uint8 `json:"type"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -66,5 +65,4 @@ service ppanel {
|
||||
@doc "Create ticket"
|
||||
@handler CreateUserTicket
|
||||
post / (CreateUserTicketRequest)
|
||||
}
|
||||
|
||||
}
|
||||
+10
-11
@@ -95,22 +95,22 @@ type (
|
||||
|
||||
GetSubscribeLogResponse {
|
||||
List []UserSubscribeLog `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
UpdateBindMobileRequest{
|
||||
AreaCode string `json:"area_code" validate:"required"`
|
||||
Mobile string `json:"mobile" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
UpdateBindMobileRequest {
|
||||
AreaCode string `json:"area_code" validate:"required"`
|
||||
Mobile string `json:"mobile" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
|
||||
UpdateBindEmailRequest{
|
||||
Email string `json:"email" validate:"required"`
|
||||
UpdateBindEmailRequest {
|
||||
Email string `json:"email" validate:"required"`
|
||||
}
|
||||
|
||||
VerifyEmailRequest {
|
||||
Email string `json:"email" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
Email string `json:"email" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -207,5 +207,4 @@ service ppanel {
|
||||
@doc "Update Bind Email"
|
||||
@handler UpdateBindEmail
|
||||
put /bind_email (UpdateBindEmailRequest)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user