fixed verifying site with subdomains

This commit is contained in:
Jon Lambson 2017-11-08 11:25:49 -07:00
parent 655b3117b7
commit 39b9dae216
3 changed files with 3 additions and 9 deletions

View File

@ -297,7 +297,6 @@ app.controller('websiteCtrl', [
return;
}
*/
debugger;
if (!vm.newFile) {
window.alert('No file chosen.');
return;
@ -336,7 +335,6 @@ app.controller('websiteCtrl', [
// We're claiming it at the top level (i.e. example.com)
// but we could also claim it at the subdomain level (needs UI update)
var domainReq = { sld: sld, tld: tld, sub: sub };
debugger;
return pkg.request(domainReq).then(function (result) {
var sess;
var prom;
@ -357,7 +355,7 @@ app.controller('websiteCtrl', [
prom = Auth.get(sess).then(function (oauth3) {
sub = result.data.prefix;
if (result.data.sub) {
sub = result.data.sub + '.' + result.data.prefix;
sub += '.' + result.data.sub;
}
return oauth3.api('dns.set', { sld: sld, tld: tld, sub: sub, type: 'TXT', ttl: 5, value: result.data.challenge });
});
@ -452,7 +450,6 @@ app.controller('websiteCtrl', [
sub: r.sub,
path: vm.cleanedPath
}).then(function (result) {
debugger;
vm.folderStructure = result;
});
};

View File

@ -49,7 +49,6 @@ OAUTH3._pkgs['www@daplie.com'] = {
, removeShare: function (opts) {
var providerUri = opts.audience;
var session = opts.session;
debugger;
// TODO needs a way to have api and assets for audience
return OAUTH3.request({
@ -116,7 +115,6 @@ OAUTH3._pkgs['www@daplie.com'] = {
, archive: function (opts) {
var providerUri = opts.audience;
var session = opts.session;
debugger;
return OAUTH3.request({
method: 'POST'
, url: OAUTH3.url.normalize(providerUri)
@ -144,7 +142,6 @@ OAUTH3._pkgs['www@daplie.com'] = {
, contentRange: function (opts) {
var providerUri = opts.audience;
var session = opts.session;
debugger;
return OAUTH3.request({
method: 'GET'
@ -154,14 +151,12 @@ OAUTH3._pkgs['www@daplie.com'] = {
, offset: opts.offset, length: opts.length, json: true })
, session: session
}).then(function (result) {
debugger;
return result;
});
}
, remove: function (opts) {
var providerUri = opts.audience;
var session = opts.session;
debugger;
return OAUTH3.request({
method: 'DELETE'

View File

@ -39,6 +39,8 @@
<hr>
<div>
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
<div ng-if="!r.isZip"><label><input type="checkbox" ng-model="r.indexableFile" /> Indexable?</label></div>
<div ng-if="!r.isZip"><label><input type="checkbox" ng-model="r.publicFile" /> Public?</label></div>
<div ng-if="r.isZip"><label><input type="checkbox" ng-model="r.unzip" /> Unpack .zip</label></div>
<div ng-if="r.unzip"><label><input type="checkbox" ng-model="r.stripZip" /> Strip zip directory root</label></div>
<div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div>