This commit is contained in:
CortexCore 2024-04-28 16:17:31 +08:00
parent 5ca9a8ee1b
commit 6766f4d920
5 changed files with 30 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using BITKit;
using IDIS;
using IDIS.Models;
using IDIS.Services;
using Microsoft.AspNetCore.Mvc;
@ -48,11 +49,15 @@ public class IDISController:Controller
return await _service.IsExistAsync(key);
}
[HttpGet]
[HttpPost]
[Route("register")]
public string Register([FromBody] string json)
public async Task<IActionResult> Register()
{
return "err:0";
using var reader = new StreamReader(Request.Body);
var json = await reader.ReadToEndAsync();
var data = JsonConvert.DeserializeObject<IDIS_Register_Data>(json)!;
var response = await _service.RegisterAsync(data.Handle, data.TemplateVersion, data.Value);
return Ok(response);
}
[HttpGet]
[Route("update")]

22
ReadMe.md Normal file
View File

@ -0,0 +1,22 @@
# IDIS Server Console
### IDIS 标识解析服务器控制台
指南版本`v0.1`
未包括所有功能
## 食用指南
### 注册:
![Clip_20240428_161137.png](ReadMe%2FClip_20240428_161137.png)
#### WebApi:`localhost:5242/api/register`
```json
{
"handle": "88.123.99/202404281606",
"templateVersion": "1.0",
"value": {
"key1": "value1",
"key2": "value2"
}
}
```
### 查询:
![Clip_20240428_161438.png](ReadMe%2FClip_20240428_161438.png)
#### WebApi:`localhost:5242/api/query?key={handle}`

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB