add web, api endpoint
This commit is contained in:
parent
1e834612cb
commit
89b24e0bf6
@ -12,7 +12,8 @@
|
||||
{"file": "20180718-1.sql", "version": 10},
|
||||
{"file": "20180719-1.sql", "version": 11},
|
||||
{"file": "20180721-1.sql", "version": 12},
|
||||
{"file": "20180807-1.sql", "version": 13}
|
||||
{"file": "20180807-1.sql", "version": 13},
|
||||
{"file": "20180811-1.sql", "version": 14}
|
||||
],
|
||||
"test": []
|
||||
}
|
4
route/api/index.js
Normal file
4
route/api/index.js
Normal file
@ -0,0 +1,4 @@
|
||||
const Router = require('koa-router')
|
||||
const r = new Router()
|
||||
|
||||
module.exports = r
|
@ -99,6 +99,8 @@ r.get('/image/thumbnail/:name', async (c, n) => {
|
||||
return n()
|
||||
}, getImageToRes)
|
||||
|
||||
r.use('/web', require('./web').routes())
|
||||
r.use('/api', require('./api').routes())
|
||||
r.use('/line', require('./line').routes())
|
||||
r.use('/google', require('./google').routes())
|
||||
// r.use('/twitch', require('./twitch').routes())
|
||||
|
4
route/web/index.js
Normal file
4
route/web/index.js
Normal file
@ -0,0 +1,4 @@
|
||||
const Router = require('koa-router')
|
||||
const r = new Router()
|
||||
|
||||
module.exports = r
|
11
schema/20180811-1.sql
Normal file
11
schema/20180811-1.sql
Normal file
@ -0,0 +1,11 @@
|
||||
CREATE TABLE public.donate_progres
|
||||
(
|
||||
twitch varchar(100) PRIMARY KEY NOT NULL,
|
||||
start_date timestamp with time zone,
|
||||
end_date timestamp with time zone,
|
||||
target_amount int DEFAULT 0 NOT NULL,
|
||||
title varchar(200) DEFAULT '' NOT NULL,
|
||||
ctime timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
mtime timestamp with time zone DEFAULT current_timestamp NOT NULL,
|
||||
CONSTRAINT donate_progres_twitch_channel_id_fk FOREIGN KEY (twitch) REFERENCES public.twitch_channel (id) ON DELETE CASCADE
|
||||
);
|
Loading…
Reference in New Issue
Block a user