Commit 213593fa authored by liaozan's avatar liaozan 🏀

chore: update controller

parent 24e3f5e8
...@@ -3,7 +3,7 @@ package com.schbrain.archetype.initializer.controller; ...@@ -3,7 +3,7 @@ package com.schbrain.archetype.initializer.controller;
import com.schbrain.archetype.initializer.param.ArchetypeGenerateParam; import com.schbrain.archetype.initializer.param.ArchetypeGenerateParam;
import com.schbrain.archetype.initializer.response.PreviewFileTree; import com.schbrain.archetype.initializer.response.PreviewFileTree;
import com.schbrain.archetype.initializer.service.ArchetypeService; 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.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -34,7 +34,7 @@ import java.util.stream.Collectors; ...@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
@Service @Service
public class ArchetypeService { 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 @Autowired
private ArchetypePreparer archetypePreparer; private ArchetypePreparer archetypePreparer;
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
"dependencies": { "dependencies": {
"vue": "^3.2.37", "vue": "^3.2.37",
"axios": "^0.27.2", "axios": "^0.27.2",
"ant-design-vue": "^3.2.10", "ant-design-vue": "^3.2.11",
"highlight.js": "^11.6.0", "highlight.js": "^11.6.0",
"@highlightjs/vue-plugin": "^2.1.0" "@highlightjs/vue-plugin": "^2.1.0"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^3.0.1", "@vitejs/plugin-vue": "^3.0.3",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"vite": "^3.0.4", "vite": "^3.0.7",
"vue-tsc": "^0.39.4" "vue-tsc": "^0.40.1"
} }
} }
\ No newline at end of file
...@@ -133,7 +133,7 @@ const onGenerate = async () => { ...@@ -133,7 +133,7 @@ const onGenerate = async () => {
let data: BaseResponse = await request.post('/archetype/generate', result) let data: BaseResponse = await request.post('/archetype/generate', result)
if (data.code === 0) { if (data.code === 0) {
id.value = data.result id.value = data.data
message.success('生成成功!') message.success('生成成功!')
} }
} }
...@@ -187,14 +187,14 @@ const downloadGeneratedProject = (data: BlobPart, fileName: string) => { ...@@ -187,14 +187,14 @@ const downloadGeneratedProject = (data: BlobPart, fileName: string) => {
const fetchFileList = async (id: number) => { const fetchFileList = async (id: number) => {
let data: BaseResponse = await request.get(`/archetype/preview/${id}`) let data: BaseResponse = await request.get(`/archetype/preview/${id}`)
if (data.code === 0) { if (data.code === 0) {
return data.result return data.data
} }
} }
const fetchGroupList = async () => { const fetchGroupList = async () => {
let data: BaseResponse = await request.get(`/gitlab/groups`) let data: BaseResponse = await request.get(`/gitlab/groups`)
if (data.code === 0) { 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