巴林闲侠
2 years ago
7 changed files with 153 additions and 6 deletions
@ -0,0 +1,14 @@ |
|||
'use strict'; |
|||
|
|||
const toolLink = require('../../controllers/console/toolLink'); |
|||
|
|||
module.exports = function (app, router, opts) { |
|||
app.fs.api.logAttr['GET/console/toollink'] = { content: '获取常用工具', visible: true }; |
|||
router.get('/console/toollink', toolLink.list); |
|||
|
|||
app.fs.api.logAttr['PUT/console/toollink'] = { content: '编辑常用工具', visible: true }; |
|||
router.put('/console/toollink', toolLink.edit); |
|||
|
|||
app.fs.api.logAttr['DEL/console/toollink'] = { content: '删除常用工具', visible: true }; |
|||
router.del('/console/toollink/:linkId', toolLink.del); |
|||
}; |
@ -0,0 +1,17 @@ |
|||
create table if not exists quick_link |
|||
( |
|||
id serial not null, |
|||
user_id integer not null, |
|||
link varchar(256) not null, |
|||
name varchar(32) not null, |
|||
constraint quick_link_pk |
|||
primary key (id), |
|||
constraint quick_link_user_id_fk |
|||
foreign key (user_id) references "user" |
|||
); |
|||
|
|||
comment on table quick_link is '对应我的常用工具功能'; |
|||
|
|||
create unique index if not exists quick_link_id_uindex |
|||
on quick_link (id); |
|||
|
Loading…
Reference in new issue