mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:07:03 +08:00
FEATURE: Watched Words: when posts contain words, do one of flag, require approval, censor, or block
This commit is contained in:
@ -334,6 +334,17 @@ export default function() {
|
||||
this.post('/admin/badges', success);
|
||||
this.delete('/admin/badges/:id', success);
|
||||
|
||||
this.get('/admin/watched_words', () => {
|
||||
return response(200, fixturesByUrl['/admin/watched_words.json']);
|
||||
});
|
||||
this.delete('/admin/watched_words/:id.json', success);
|
||||
|
||||
this.post('/admin/watched_words.json', request => {
|
||||
const result = parsePostData(request.requestBody);
|
||||
result.id = new Date().getTime();
|
||||
return response(200, result);
|
||||
});
|
||||
|
||||
this.get('/onebox', request => {
|
||||
if (request.queryParams.url === 'http://www.example.com/has-title.html' ||
|
||||
request.queryParams.url === 'http://www.example.com/has-title-and-a-url-that-is-more-than-80-characters-because-thats-good-for-seo-i-guess.html') {
|
||||
|
Reference in New Issue
Block a user