@@ -67,14 +67,14 @@ exports.setup = function (App) {
6767 htmlVars . request_result = ( ok ? 'ok-msg' : ( error ? 'error-msg' : '' ) ) ;
6868 htmlVars . request_msg = ( ok ? ok : ( error || "" ) ) ;
6969
70- context . endWithWebPage ( listTemplate . make ( htmlVars ) , { title : "Add-ons - Showdown ChatBot" } ) ;
70+ context . endWithWebPage ( listTemplate . make ( htmlVars ) , { title : "Add-ons - Showdown ChatBot" } ) ;
7171 } ) ;
7272
7373 function newAddonHandler ( context , parts ) {
7474 let ok = null , error = null ;
7575
7676 if ( context . post . add ) {
77- let addon = Text . toCmdid ( context . post . addon ) ;
77+ let addon = Text . toAddOnId ( context . post . addon ) ;
7878 let file = App . addonsDir + '/' + addon + ".js" ;
7979 let content = ( context . post . content || "" ) . trim ( ) ;
8080 try {
@@ -94,7 +94,7 @@ exports.setup = function (App) {
9494 error = "Failed to install the add-on" ;
9595 } else {
9696 App . logServerAction ( context . user . id , 'Add-on installed: ' + file ) ;
97- context . response . writeHead ( 302 , { 'Location' : '/addons/' } ) ;
97+ context . response . writeHead ( 302 , { 'Location' : '/addons/' } ) ;
9898 context . response . end ( ) ;
9999 return ;
100100 }
@@ -106,7 +106,7 @@ exports.setup = function (App) {
106106 htmlVars . request_result = ( ok ? 'ok-msg' : ( error ? 'error-msg' : '' ) ) ;
107107 htmlVars . request_msg = ( ok ? ok : ( error || "" ) ) ;
108108
109- context . endWithWebPage ( addingTemplate . make ( htmlVars ) , { title : "New Add-on - Showdown ChatBot" } ) ;
109+ context . endWithWebPage ( addingTemplate . make ( htmlVars ) , { title : "New Add-on - Showdown ChatBot" } ) ;
110110 }
111111
112112 function editAddonHandler ( context , parts ) {
@@ -157,6 +157,6 @@ exports.setup = function (App) {
157157 htmlVars . request_result = ( ok ? 'ok-msg' : ( error ? 'error-msg' : '' ) ) ;
158158 htmlVars . request_msg = ( ok ? ok : ( error || "" ) ) ;
159159
160- context . endWithWebPage ( editTemplate . make ( htmlVars ) , { title : "Add-ons - Showdown ChatBot" } ) ;
160+ context . endWithWebPage ( editTemplate . make ( htmlVars ) , { title : "Add-ons - Showdown ChatBot" } ) ;
161161 }
162162} ;
0 commit comments