瀏覽代碼

Update docs for user creation

Lee Morgan 2 月之前
父節點
當前提交
1c4ab99431
共有 4 個文件被更改,包括 15 次插入356 次删除
  1. 1 0
      .gitignore
  2. 10 0
      docs/paths/user/create.yaml
  3. 0 355
      docs/redoc-static.html
  4. 4 1
      src/controllers/user/create.rs

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 /target
 *.swp
 *.swo
+redoc-static.html

+ 10 - 0
docs/paths/user/create.yaml

@@ -31,6 +31,16 @@ requestBody:
             type: string
             description: Confirmation of password
             example: johnsmith123
+          url:
+            type: string
+            format: url
+            description: Honeypot. If it contains anything other than 'https://' then return success without creating account.
+            example: https://
+          time:
+            type: string
+            format: date
+            description: Honeypot. Must be within 10 minutes of submission.
+            example: 2026-05-07T22:40:54.963Z
 
 responses:
   "200":

文件差異過大導致無法顯示
+ 0 - 355
docs/redoc-static.html


+ 4 - 1
src/controllers/user/create.rs

@@ -10,11 +10,14 @@ struct Body {
     name: String,
     email: String,
     password: String,
-    confirm_password: String
+    confirm_password: String,
+    url: Option<String>,
+    time: Option<String>
 }
 
 pub async fn route(
     db: web::Data<PgPool>,
     body: web::Json<Body>
 ) -> Result<HttpResponse, AppError> {
+    
 }

部分文件因文件數量過多而無法顯示