This commit is contained in:
syuilo
2017-10-31 22:35:31 +09:00
parent 30a4e839a6
commit 5efb52b9f5
7 changed files with 26 additions and 15 deletions

View File

@@ -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;

View File

@@ -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