Skip to content

Commit

Permalink
Merge pull request #75 from internetstandards/subdomainsuggestionsget
Browse files Browse the repository at this point in the history
Use GET request for subdomain suggestions
  • Loading branch information
aequitas authored Nov 20, 2024
2 parents a3ee803 + 33763fe commit 7796df8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/domains/list/discover-subdomains.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,15 @@ export default {
find_suggestions: function () {

this.loading_suggestions = true;
http.post('data/urllist/suggest-subdomains/', {domain: this.input_domain, period: this.period}).then(server_response => {
http.get('data/urllist/suggest-subdomains/', { params: { domain: this.input_domain, period: this.period } }).then(server_response => {
if (server_response.data.length > 0) {
// allow the top level domain also to be added / selected as a convenience.
this.suggestions = [this.input_domain];
server_response.data.forEach(suggestion => {
this.suggestions.push(suggestion + "." + this.input_domain);
})
} else {
console.error("Failed loading suggestions.")
this.suggestions = [];
}
this.loading_suggestions = false;
Expand Down Expand Up @@ -242,4 +243,4 @@ export default {
"enter_domain_name": "Voor een domeinnaam in zoals internet.nl om subdomeinen te vinden..."
}
}
</i18n>
</i18n>

0 comments on commit 7796df8

Please sign in to comment.