mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
njs: change responseBody to responseText
Because of the deprecation of responseBody Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
This commit is contained in:
parent
bdf2e73e71
commit
fdb23012c4
|
|
@ -9,7 +9,7 @@ function fancyIndexRender(r, templateUrl){
|
|||
if(rTmpl.status != 200){
|
||||
return r.return(rTmpl.status);
|
||||
}
|
||||
var tmpl = rTmpl.responseBody;
|
||||
var tmpl = rTmpl.responseText;
|
||||
var result = Mark.up(tmpl, {
|
||||
url: r.variables.request_uri.replace(/\/+/g, '/').replace(/\?.*$/, ''),
|
||||
open: '{{',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function legacyIndexRender(r){
|
|||
if(rTmpl.status != 200){
|
||||
return r.return(rTmpl.status);
|
||||
}
|
||||
var tmpl = rTmpl.responseBody;
|
||||
var tmpl = rTmpl.responseText;
|
||||
|
||||
r.subrequest('/static/njs/options.json', {
|
||||
args: '',
|
||||
|
|
@ -36,7 +36,7 @@ function legacyIndexRender(r){
|
|||
}
|
||||
var global_options;
|
||||
try{
|
||||
global_options = JSON.parse(rOpt.responseBody);
|
||||
global_options = JSON.parse(rOpt.responseText);
|
||||
}catch(e){
|
||||
return r.return(500);
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ function legacyIndexRender(r){
|
|||
var mirs = unlisted;
|
||||
if(rMirs.status == 200){
|
||||
try{
|
||||
mirs = mirs.concat(JSON.parse(rMirs.responseBody));
|
||||
mirs = mirs.concat(JSON.parse(rMirs.responseText));
|
||||
}catch(e){
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue