feat: 设备编号从 00000001 顺序分配

This commit is contained in:
Nixevol
2026-10-12 08:54:17 +08:00
parent 775599174b
commit c334dbc040
8 changed files with 119 additions and 29 deletions
+2 -2
View File
@@ -46,13 +46,13 @@ type Endpoint struct {
Found bool
}
func (c *Client) CreateEndpoint(ctx context.Context, name string) (Endpoint, error) {
func (c *Client) CreateEndpoint(ctx context.Context, id, name string) (Endpoint, error) {
var out struct {
ID string `json:"id"`
LoginPassword string `json:"login_password"`
}
err := c.call(ctx, http.MethodPost, "/api/admin/endpoints", map[string]any{
"id": "",
"id": id,
"name": name,
"remark": "",
"login_password": "",