From b8d14ec960393c18b27dcbe224397b188140ddba Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 9 Nov 2024 13:41:31 +0900 Subject: [PATCH] fix --- README.md | 7 +++++++ at/lexicons/ai/syui/game/user.json | 6 ++++++ src/main.rs | 2 ++ 3 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 577f0a6..3a10335 100644 --- a/README.md +++ b/README.md @@ -116,4 +116,11 @@ $ docker compose up -d ```sh # oauth(button) [yui]ai.syui.card.verify -> [user]ai.syui.card + +[yui] +$ ./target/debug/ai card-verify -i 0 -p 0 -r 0 -h syui.ai -d did:plc:uqzpqmrjnptsxezjx4xuh2mn +{"uri":"at://did:plc:4hqjfn7m6n5hno3doamuhgef/ai.syui.card.verify/3lagpvhppmd2q"} + +[user] +$ ./target/debug/ai card -i 0 -p 0 -r 0 -v at://did:plc:4hqjfn7m6n5hno3doamuhgef/ai.syui.card.verify/3lagpvhppmd2q ``` diff --git a/at/lexicons/ai/syui/game/user.json b/at/lexicons/ai/syui/game/user.json index 25e32b1..4f0c4d1 100644 --- a/at/lexicons/ai/syui/game/user.json +++ b/at/lexicons/ai/syui/game/user.json @@ -41,6 +41,12 @@ "maximum": 7, "default": 0 }, + "mode":{ + "type": "integer", + "minimum": 0, + "maximum": 7, + "default": 0 + }, "hp":{ "type": "integer", "maximum": 255, diff --git a/src/main.rs b/src/main.rs index fead43f..0802f84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -578,6 +578,8 @@ async fn c_card_verify(c: &Context) -> Result<(), Box> { let rare = c.string_flag("rare").unwrap_or_else(|_| "normal".to_string()); let user_handle = c.string_flag("handle").unwrap_or_else(|_| "syui.ai".to_string()); let user_did = c.string_flag("did").unwrap_or_else(|_| "did:plc:uqzpqmrjnptsxezjx4xuh2mn".to_string()); + + //match id === 1 let img = "xxx"; let str = post_card_verify::post_request(col, img, id, cp, rank, rare, user_handle, user_did); println!("{}", str.await); Ok(())