This commit is contained in:
parent
5ca9a8ee1b
commit
6766f4d920
|
@ -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")]
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# IDIS Server Console
|
||||
### IDIS 标识解析服务器控制台
|
||||
指南版本`v0.1`
|
||||
|
||||
未包括所有功能
|
||||
## 食用指南
|
||||
### 注册:
|
||||

|
||||
#### WebApi:`localhost:5242/api/register`
|
||||
```json
|
||||
{
|
||||
"handle": "88.123.99/202404281606",
|
||||
"templateVersion": "1.0",
|
||||
"value": {
|
||||
"key1": "value1",
|
||||
"key2": "value2"
|
||||
}
|
||||
}
|
||||
```
|
||||
### 查询:
|
||||

|
||||
#### 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 |
Loading…
Reference in New Issue