1
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using BITKit;
|
using BITKit;
|
||||||
|
using IDIS;
|
||||||
using IDIS.Models;
|
using IDIS.Models;
|
||||||
using IDIS.Services;
|
using IDIS.Services;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@@ -48,11 +49,15 @@ public class IDISController:Controller
|
|||||||
return await _service.IsExistAsync(key);
|
return await _service.IsExistAsync(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpPost]
|
||||||
[Route("register")]
|
[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]
|
[HttpGet]
|
||||||
[Route("update")]
|
[Route("update")]
|
||||||
|
22
ReadMe.md
Normal file
22
ReadMe.md
Normal file
@@ -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}`
|
BIN
ReadMe/Clip_20240428_161137.png
Normal file
BIN
ReadMe/Clip_20240428_161137.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
BIN
ReadMe/Clip_20240428_161438.png
Normal file
BIN
ReadMe/Clip_20240428_161438.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Reference in New Issue
Block a user