Commit 213593fa authored by liaozan's avatar liaozan 🏀

chore: update controller

parent 24e3f5e8
......@@ -3,7 +3,7 @@ package com.schbrain.archetype.initializer.controller;
import com.schbrain.archetype.initializer.param.ArchetypeGenerateParam;
import com.schbrain.archetype.initializer.response.PreviewFileTree;
import com.schbrain.archetype.initializer.service.ArchetypeService;
import com.schbrain.common.support.result.ResponseDTO;
import com.schbrain.common.web.result.ResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......
......@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
@Service
public class ArchetypeService {
private final TimedCache<String, String> archetypeNameCache = new TimedCache<>(Duration.ofDays(1).toMillis());
private final TimedCache<String, String> archetypeNameCache = new TimedCache<>(Duration.ofHours(1).toMillis());
@Autowired
private ArchetypePreparer archetypePreparer;
......
......@@ -8,14 +8,14 @@
"dependencies": {
"vue": "^3.2.37",
"axios": "^0.27.2",
"ant-design-vue": "^3.2.10",
"ant-design-vue": "^3.2.11",
"highlight.js": "^11.6.0",
"@highlightjs/vue-plugin": "^2.1.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue": "^3.0.3",
"typescript": "^4.7.4",
"vite": "^3.0.4",
"vue-tsc": "^0.39.4"
"vite": "^3.0.7",
"vue-tsc": "^0.40.1"
}
}
\ No newline at end of file
......@@ -133,7 +133,7 @@ const onGenerate = async () => {
let data: BaseResponse = await request.post('/archetype/generate', result)
if (data.code === 0) {
id.value = data.result
id.value = data.data
message.success('生成成功!')
}
}
......@@ -187,14 +187,14 @@ const downloadGeneratedProject = (data: BlobPart, fileName: string) => {
const fetchFileList = async (id: number) => {
let data: BaseResponse = await request.get(`/archetype/preview/${id}`)
if (data.code === 0) {
return data.result
return data.data
}
}
const fetchGroupList = async () => {
let data: BaseResponse = await request.get(`/gitlab/groups`)
if (data.code === 0) {
return data.result
return data.data
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment