Toggle navigation
Toggle navigation
This project
Loading...
Sign in
201side
/
floater
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
robin*
2020-12-09 12:49:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ac337366081a67e183545a287bff85ab67210ccb
ac337366
1 parent
a2c04df8
메인 판 목록 추가
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
src/routes/board.js
src/views/boardlist.handlebars
src/routes/board.js
View file @
ac33736
const
app
=
require
(
'../server'
);
const
db
=
require
(
'../db'
);
app
.
get
(
'/
board
'
,
async
(
req
,
res
)
=>
{
res
.
json
(
{
boards
:
await
db
.
get
(
'board'
).
find
()});
app
.
get
(
'/'
,
async
(
req
,
res
)
=>
{
res
.
render
(
'boardlist'
,
{
boards
:
await
db
.
get
(
'board'
).
find
()});
})
app
.
get
(
'/board/:bid'
,
async
(
req
,
res
)
=>
{
let
board
=
await
db
.
get
(
'board'
).
findOne
({
name
:
req
.
params
.
bid
});
...
...
src/views/boardlist.handlebars
0 → 100644
View file @
ac33736
<div
class=
"list-group"
>
{{#
each
boards
}}
<a
href=
"/board/
{{
this
.
name
}}
"
class=
"list-group-item list-group-item-action"
>
{{
this
.
title
}}
</a>
{{/
each
}}
</div>
\ No newline at end of file
Please
register
or
login
to post a comment