mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-23 11:17:54 +08:00
fixbugs
This commit is contained in:
@@ -69,6 +69,7 @@ exports.post '/update_site/', (req, res) ->
|
||||
, callback
|
||||
|
||||
addSite = (callback) ->
|
||||
req.body.config._id = new ObjectID()
|
||||
mAccount.update _id: req.account._id,
|
||||
$push:
|
||||
'attribute.plugin.nginx.sites': req.body.config
|
||||
|
||||
@@ -20,7 +20,7 @@ exports.assert = (account, config, site_id, callback) ->
|
||||
site = _.find result.attribute.plugin.nginx.sites, (i) ->
|
||||
return domain in i.server_name
|
||||
|
||||
if site._id.toString() == site_id.toString()
|
||||
if site._id.toString() == site_id?.toString()
|
||||
callback null
|
||||
else
|
||||
callback 'unavailable_server_name'
|
||||
|
||||
@@ -7,7 +7,7 @@ server {
|
||||
|
||||
root <%= site.root %>;
|
||||
|
||||
<% _.each(site.location, function(rules, path) {
|
||||
<% _.each(site.location, function(rules, path) { %>
|
||||
location <%= path %> {
|
||||
<% _.each(rules, function(param, command) { %>
|
||||
<% if(_.isArray(param)) { %>
|
||||
|
||||
Reference in New Issue
Block a user