浏览代码

Fix feeds

MarkusRost 4 年之前
父节点
当前提交
3d88bd4d73
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      dashboard/rcscript.js

+ 4 - 4
dashboard/rcscript.js

@@ -368,8 +368,8 @@ function update_rcscript(res, userSettings, guild, type, settings) {
 						}
 					} ).then( dsresponse => {
 						var dsbody = dsresponse.body;
-						if ( dsresponse.statusCode !== 200 || !dsbody || dsbody.title ) {
-							if ( dsbody?.title !== 'site doesn\'t exists' ) console.log( '- Dashboard: ' + dsresponse.statusCode + ': Error while checking for discussions: ' + dsbody?.title );
+						if ( dsresponse.statusCode !== 200 || !dsbody || dsbody.status === 404 ) {
+							if ( dsbody?.status !== 404 ) console.log( '- Dashboard: ' + dsresponse.statusCode + ': Error while checking for discussions: ' + dsbody?.title );
 							return createWebhook();
 						}
 						return createWebhook(true);
@@ -582,8 +582,8 @@ function update_rcscript(res, userSettings, guild, type, settings) {
 							}
 						} ).then( dsresponse => {
 							var dsbody = dsresponse.body;
-							if ( dsresponse.statusCode !== 200 || !dsbody || dsbody.title ) {
-								if ( dsbody?.title !== 'site doesn\'t exists' ) console.log( '- Dashboard: ' + dsresponse.statusCode + ': Error while checking for discussions: ' + dsbody?.title );
+							if ( dsresponse.statusCode !== 200 || !dsbody || dsbody.status === 404 ) {
+								if ( dsbody?.status !== 404 ) console.log( '- Dashboard: ' + dsresponse.statusCode + ': Error while checking for discussions: ' + dsbody?.title );
 								return updateWebhook();
 							}
 							return updateWebhook(true);