fix build

This commit is contained in:
ljw
2024-09-29 12:23:34 +08:00
parent f8a672070f
commit 71c44a501b
4 changed files with 96 additions and 27 deletions

View File

@@ -34,7 +34,7 @@ on:
env: env:
LATEST_TAG: latest LATEST_TAG: latest
WEBCLIENT_SOURCE_LOCATION: ${{ github.event.inputs.WEBCLIENT_SOURCE_LOCATION }} WEBCLIENT_SOURCE_LOCATION: ${{ github.event.inputs.WEBCLIENT_SOURCE_LOCATION || 'https://github.com/lejianwen/rustdesk-api-web' }}
BASE_IMAGE_NAMESPACE: ${{ github.event.inputs.BASE_IMAGE_NAMESPACE || github.actor }} BASE_IMAGE_NAMESPACE: ${{ github.event.inputs.BASE_IMAGE_NAMESPACE || github.actor }}
DOCKERHUB_IMAGE_NAMESPACE: ${{ github.event.inputs.DOCKERHUB_IMAGE_NAMESPACE || github.actor }} DOCKERHUB_IMAGE_NAMESPACE: ${{ github.event.inputs.DOCKERHUB_IMAGE_NAMESPACE || github.actor }}
GHCR_IMAGE_NAMESPACE: ${{ github.event.inputs.GHCR_IMAGE_NAMESPACE || github.actor }} GHCR_IMAGE_NAMESPACE: ${{ github.event.inputs.GHCR_IMAGE_NAMESPACE || github.actor }}
@@ -257,7 +257,7 @@ jobs:
with: with:
base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }} base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}
extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64, extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64,
${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64 ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64
push: true push: true
- name: Create and push manifest GHCR (:version) - name: Create and push manifest GHCR (:version)
@@ -266,7 +266,7 @@ jobs:
with: with:
base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }} base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}
extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64, extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64,
ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64 ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64
push: true push: true
amend: true amend: true
@@ -276,7 +276,7 @@ jobs:
with: with:
base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest
extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64, extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64,
${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64 ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64
push: true push: true
- name: Create and push manifest GHCR (:latest) - name: Create and push manifest GHCR (:latest)
@@ -285,6 +285,6 @@ jobs:
with: with:
base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest
extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64, extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64,
ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64 ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64
push: true push: true
amend: true amend: true

View File

@@ -22,7 +22,7 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "创建地址簿", "description": "批量创建地址簿",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -32,7 +32,7 @@ const docTemplateadmin = `{
"tags": [ "tags": [
"地址簿" "地址簿"
], ],
"summary": "创建地址簿", "summary": "批量创建地址簿",
"parameters": [ "parameters": [
{ {
"description": "地址簿信息", "description": "地址簿信息",
@@ -1242,7 +1242,7 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "设备删除", "description": "批量设备删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -1252,15 +1252,15 @@ const docTemplateadmin = `{
"tags": [ "tags": [
"设备" "设备"
], ],
"summary": "设备删除", "summary": "批量设备删除",
"parameters": [ "parameters": [
{ {
"description": "设备信息", "description": "设备id",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/admin.PeerForm" "$ref": "#/definitions/admin.PeerBatchDeleteForm"
} }
} }
], ],
@@ -1365,6 +1365,12 @@ const docTemplateadmin = `{
"description": "页大小", "description": "页大小",
"name": "page_size", "name": "page_size",
"in": "query" "in": "query"
},
{
"type": "integer",
"description": "时间",
"name": "time_ago",
"in": "query"
} }
], ],
"responses": { "responses": {
@@ -2311,6 +2317,12 @@ const docTemplateadmin = `{
"user_id": { "user_id": {
"type": "integer" "type": "integer"
}, },
"user_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"username": { "username": {
"type": "string" "type": "string"
} }
@@ -2398,6 +2410,20 @@ const docTemplateadmin = `{
} }
} }
}, },
"admin.PeerBatchDeleteForm": {
"type": "object",
"required": [
"row_ids"
],
"properties": {
"row_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"admin.PeerForm": { "admin.PeerForm": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -15,7 +15,7 @@
"token": [] "token": []
} }
], ],
"description": "创建地址簿", "description": "批量创建地址簿",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -25,7 +25,7 @@
"tags": [ "tags": [
"地址簿" "地址簿"
], ],
"summary": "创建地址簿", "summary": "批量创建地址簿",
"parameters": [ "parameters": [
{ {
"description": "地址簿信息", "description": "地址簿信息",
@@ -1235,7 +1235,7 @@
"token": [] "token": []
} }
], ],
"description": "设备删除", "description": "批量设备删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -1245,15 +1245,15 @@
"tags": [ "tags": [
"设备" "设备"
], ],
"summary": "设备删除", "summary": "批量设备删除",
"parameters": [ "parameters": [
{ {
"description": "设备信息", "description": "设备id",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/admin.PeerForm" "$ref": "#/definitions/admin.PeerBatchDeleteForm"
} }
} }
], ],
@@ -1358,6 +1358,12 @@
"description": "页大小", "description": "页大小",
"name": "page_size", "name": "page_size",
"in": "query" "in": "query"
},
{
"type": "integer",
"description": "时间",
"name": "time_ago",
"in": "query"
} }
], ],
"responses": { "responses": {
@@ -2304,6 +2310,12 @@
"user_id": { "user_id": {
"type": "integer" "type": "integer"
}, },
"user_ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"username": { "username": {
"type": "string" "type": "string"
} }
@@ -2391,6 +2403,20 @@
} }
} }
}, },
"admin.PeerBatchDeleteForm": {
"type": "object",
"required": [
"row_ids"
],
"properties": {
"row_ids": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"admin.PeerForm": { "admin.PeerForm": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -46,6 +46,10 @@ definitions:
type: array type: array
user_id: user_id:
type: integer type: integer
user_ids:
items:
type: integer
type: array
username: username:
type: string type: string
required: required:
@@ -107,6 +111,15 @@ definitions:
- op - op
- redirect_url - redirect_url
type: object type: object
admin.PeerBatchDeleteForm:
properties:
row_ids:
items:
type: integer
type: array
required:
- row_ids
type: object
admin.PeerForm: admin.PeerForm:
properties: properties:
cpu: cpu:
@@ -473,7 +486,7 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 创建地址簿 description: 批量创建地址簿
parameters: parameters:
- description: 地址簿信息 - description: 地址簿信息
in: body in: body
@@ -499,7 +512,7 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 创建地址簿 summary: 批量创建地址簿
tags: tags:
- 地址簿 - 地址簿
/admin/address_book/delete: /admin/address_book/delete:
@@ -1196,14 +1209,14 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 设备删除 description: 批量设备删除
parameters: parameters:
- description: 设备信息 - description: 设备id
in: body in: body
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/admin.PeerForm' $ref: '#/definitions/admin.PeerBatchDeleteForm'
produces: produces:
- application/json - application/json
responses: responses:
@@ -1217,7 +1230,7 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 设备删除 summary: 批量设备删除
tags: tags:
- 设备 - 设备
/admin/peer/detail/{id}: /admin/peer/detail/{id}:
@@ -1266,6 +1279,10 @@ paths:
in: query in: query
name: page_size name: page_size
type: integer type: integer
- description: 时间
in: query
name: time_ago
type: integer
produces: produces:
- application/json - application/json
responses: responses: