保存更多图片元数据并同步更新前端

This commit is contained in:
2026-01-27 13:52:40 +08:00
parent 6dfffe1236
commit 9c2a5d5cd8
11 changed files with 331 additions and 72 deletions

View File

@@ -461,8 +461,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -518,8 +517,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -575,8 +573,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -607,8 +604,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -885,6 +881,61 @@ const docTemplate = `{
}
}
},
"handlers.ImageMetaResp": {
"type": "object",
"properties": {
"copyright": {
"type": "string"
},
"copyrightlink": {
"type": "string"
},
"date": {
"type": "string"
},
"fullstartdate": {
"type": "string"
},
"hsh": {
"type": "string"
},
"quiz": {
"type": "string"
},
"startdate": {
"type": "string"
},
"title": {
"type": "string"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.ImageVariantResp"
}
}
}
},
"handlers.ImageVariantResp": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"size": {
"type": "integer"
},
"storage_key": {
"type": "string"
},
"url": {
"type": "string"
},
"variant": {
"type": "string"
}
}
},
"handlers.LoginRequest": {
"type": "object",
"required": [

View File

@@ -455,8 +455,7 @@
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -512,8 +511,7 @@
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -569,8 +567,7 @@
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -601,8 +598,7 @@
"schema": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
"$ref": "#/definitions/handlers.ImageMetaResp"
}
}
}
@@ -879,6 +875,61 @@
}
}
},
"handlers.ImageMetaResp": {
"type": "object",
"properties": {
"copyright": {
"type": "string"
},
"copyrightlink": {
"type": "string"
},
"date": {
"type": "string"
},
"fullstartdate": {
"type": "string"
},
"hsh": {
"type": "string"
},
"quiz": {
"type": "string"
},
"startdate": {
"type": "string"
},
"title": {
"type": "string"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.ImageVariantResp"
}
}
}
},
"handlers.ImageVariantResp": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"size": {
"type": "integer"
},
"storage_key": {
"type": "string"
},
"url": {
"type": "string"
},
"variant": {
"type": "string"
}
}
},
"handlers.LoginRequest": {
"type": "object",
"required": [

View File

@@ -178,6 +178,42 @@ definitions:
required:
- name
type: object
handlers.ImageMetaResp:
properties:
copyright:
type: string
copyrightlink:
type: string
date:
type: string
fullstartdate:
type: string
hsh:
type: string
quiz:
type: string
startdate:
type: string
title:
type: string
variants:
items:
$ref: '#/definitions/handlers.ImageVariantResp'
type: array
type: object
handlers.ImageVariantResp:
properties:
format:
type: string
size:
type: integer
storage_key:
type: string
url:
type: string
variant:
type: string
type: object
handlers.LoginRequest:
properties:
password:
@@ -500,8 +536,7 @@ paths:
"200":
description: OK
schema:
additionalProperties: true
type: object
$ref: '#/definitions/handlers.ImageMetaResp'
summary: 获取指定日期图片元数据
tags:
- image
@@ -538,8 +573,7 @@ paths:
"200":
description: OK
schema:
additionalProperties: true
type: object
$ref: '#/definitions/handlers.ImageMetaResp'
summary: 获取随机图片元数据
tags:
- image
@@ -576,8 +610,7 @@ paths:
"200":
description: OK
schema:
additionalProperties: true
type: object
$ref: '#/definitions/handlers.ImageMetaResp'
summary: 获取今日图片元数据
tags:
- image
@@ -597,8 +630,7 @@ paths:
description: OK
schema:
items:
additionalProperties: true
type: object
$ref: '#/definitions/handlers.ImageMetaResp'
type: array
summary: 获取图片列表
tags: