Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vridge-docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
JIRA
JIRA
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Gyeongho Park
vridge-docs
Commits
1c1215d2
Commit
1c1215d2
authored
Jan 31, 2025
by
Gyeongho Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MOD] docs
parent
4b2b6d54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
2 deletions
+47
-2
GuideController.java
...ava/com/vazil/vridge/docs/controller/GuideController.java
+40
-0
index.vue
docs-front/pages/_guide/index.vue
+1
-2
package-lock.json
package-lock.json
+6
-0
No files found.
docs-back/src/main/java/com/vazil/vridge/docs/controller/GuideController.java
0 → 100644
View file @
1c1215d2
package
com
.
vazil
.
vridge
.
docs
.
controller
;
import
com.vazil.vridge.docs.model.GuideIndex
;
import
com.vazil.vridge.docs.service.GuideIndexService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.Arrays
;
@RestController
@AllArgsConstructor
@Log4j2
@RequestMapping
(
"/api/guide"
)
@CrossOrigin
@Api
(
"가이드 API V1"
)
public
class
GuideController
{
GuideIndexService
service
;
private
static
final
String
GITHUB_TOKEN
=
"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"
;
private
static
final
String
GITHUB_URL
=
"https://raw.githubusercontent.com/vazilcompany/vridge-docs/refs/heads/main/guide/"
;
@ApiOperation
(
value
=
"가이드 조회"
)
@GetMapping
public
ResponseEntity
<
String
>
getContent
(
@RequestParam
(
name
=
"path"
)
String
contentPath
)
throws
Exception
{
try
{
RestTemplate
restTemplate
=
new
RestTemplate
();
String
response
=
restTemplate
.
getForObject
(
GITHUB_URL
+
contentPath
,
String
.
class
);
return
ResponseEntity
.
ok
(
response
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
return
ResponseEntity
.
status
(
HttpStatus
.
INTERNAL_SERVER_ERROR
).
body
(
"가이드 로드 실패"
);
}
}
}
docs-front/pages/_guide/index.vue
View file @
1c1215d2
...
...
@@ -113,8 +113,7 @@ export default {
async
getGuideContents
()
{
const
contentKey
=
`
${
this
.
guide
.
path
.
substring
(
0
,
this
.
guide
.
path
.
length
-
1
)}
.md`
await
this
.
$axios
.
get
(
`https://raw.githubusercontent.com/vazilcompany/vridge-docs/refs/heads/main/guide/
${
this
.
$i18n
.
locale
}
/`
+
contentKey
,
{
await
this
.
$axios
.
get
(
`/guide/
${
this
.
$i18n
.
locale
}
/`
+
contentKey
,
{
headers
:{
Authorization
:
'token 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'
,
}
...
...
package-lock.json
0 → 100644
View file @
1c1215d2
{
"name"
:
"vridge-docs"
,
"lockfileVersion"
:
3
,
"requires"
:
true
,
"packages"
:
{}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment