1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 12:05:23 +02:00

improved setup wizard redirection

This commit is contained in:
Harvey Kandola 2017-08-29 17:55:41 +01:00
parent 8081b60146
commit d3512b499a
15 changed files with 670 additions and 661 deletions

View file

@ -175,8 +175,6 @@ func (h *Handler) Sitemap(w http.ResponseWriter, r *http.Request) {
response.WriteBytes(w, buffer.Bytes())
}
// sitemapItem provides a means to teleport somewhere else for free.
// What did you think it did?
type sitemapItem struct {
URL string
Date string

View file

@ -78,7 +78,7 @@ func (s Scope) GetOrganization(ctx domain.RequestContext, id string) (org org.Or
// GetOrganizationByDomain returns the organization matching a given URL subdomain.
// No context is required because user might no be authenticated yet.
func (s Scope) GetOrganizationByDomain(subdomain string) (org org.Organization, err error) {
func (s Scope) GetOrganizationByDomain(subdomain string) (o org.Organization, err error) {
err = nil
subdomain = strings.TrimSpace(strings.ToLower(subdomain))
@ -93,8 +93,7 @@ func (s Scope) GetOrganizationByDomain(subdomain string) (org org.Organization,
return
}
err = stmt.Get(&org, subdomain)
err = stmt.Get(&o, subdomain)
if err != nil && err != sql.ErrNoRows {
err = errors.Wrap(err, fmt.Sprintf("unable to execute select for subdomain %s", subdomain))
return