summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-10-31 22:35:31 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-10-31 22:35:31 +0900
commit5efb52b9f563ae7d6b5383d054a6c21fee676b68 (patch)
tree96c4bf8ce8403e3a5dd75f10f7f3c1193cf2bbca /src/api
parentFix indent (diff)
downloadsharkey-5efb52b9f563ae7d6b5383d054a6c21fee676b68.tar.gz
sharkey-5efb52b9f563ae7d6b5383d054a6c21fee676b68.tar.bz2
sharkey-5efb52b9f563ae7d6b5383d054a6c21fee676b68.zip
wip
Diffstat (limited to 'src/api')
-rw-r--r--src/api/endpoints.ts12
-rw-r--r--src/api/endpoints/channels/create.ts (renamed from src/api/endpoints/bbs/threads/create.ts)4
2 files changed, 12 insertions, 4 deletions
diff --git a/src/api/endpoints.ts b/src/api/endpoints.ts
index 29a97bcb8a..26177b8775 100644
--- a/src/api/endpoints.ts
+++ b/src/api/endpoints.ts
@@ -474,8 +474,16 @@ const endpoints: Endpoint[] = [
name: 'messaging/messages/create',
withCredential: true,
kind: 'messaging-write'
- }
-
+ },
+ {
+ name: 'channels/create',
+ withCredential: true,
+ limit: {
+ duration: ms('1hour'),
+ max: 3,
+ minInterval: ms('10seconds')
+ }
+ },
];
export default endpoints;
diff --git a/src/api/endpoints/bbs/threads/create.ts b/src/api/endpoints/channels/create.ts
index d9b4d34a0c..74b089dfc3 100644
--- a/src/api/endpoints/bbs/threads/create.ts
+++ b/src/api/endpoints/channels/create.ts
@@ -2,8 +2,8 @@
* Module dependencies
*/
import $ from 'cafy';
-import Channel from '../../../models/channel';
-import serialize from '../../../serializers/channel';
+import Channel from '../../models/channel';
+import serialize from '../../serializers/channel';
/**
* Create a channel