实现联系信息提交功能,包括: 1. 新增ContactRequest类型定义 2. 添加POST /contact路由 3. 实现联系信息提交处理逻辑 4. 通过Telegram发送联系信息通知 5. 在Telegram配置中添加GroupChatID字段
This commit is contained in:
+10
-1
@@ -87,6 +87,12 @@ type (
|
||||
Total int64 `json:"total"`
|
||||
List []SubscribeClient `json:"list"`
|
||||
}
|
||||
ContactRequest {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
OtherContact string `json:"other_contact,optional"`
|
||||
Notes string `json:"notes,optional"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
@@ -99,6 +105,10 @@ service ppanel {
|
||||
@handler GetGlobalConfig
|
||||
get /site/config returns (GetGlobalConfigResponse)
|
||||
|
||||
@doc "Submit contact info"
|
||||
@handler SubmitContact
|
||||
post /contact (ContactRequest)
|
||||
|
||||
@doc "Get Tos Content"
|
||||
@handler GetTos
|
||||
get /site/tos returns (GetTosResponse)
|
||||
@@ -131,4 +141,3 @@ service ppanel {
|
||||
@handler GetClient
|
||||
get /client returns (GetSubscribeClientResponse)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user