@@ -34,7 +34,8 @@ type Store struct {
3434func (s Store ) AddOrganization (ctx domain.RequestContext , o org.Organization ) (err error ) {
3535 _ , err = ctx .Transaction .Exec (s .Bind ("INSERT INTO dmz_org (c_refid, c_company, c_title, c_message, c_domain, c_email, c_anonaccess, c_serial, c_maxtags, c_sub, c_created, c_revised) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ),
3636 o .RefID , o .Company , o .Title , o .Message , strings .ToLower (o .Domain ),
37- strings .ToLower (o .Email ), o .AllowAnonymousAccess , o .Serial , o .MaxTags , o .Subscription , o .Created , o .Revised )
37+ strings .ToLower (o .Email ), o .AllowAnonymousAccess , o .Serial , o .MaxTags ,
38+ o .Subscription , o .Created , o .Revised )
3839
3940 if err != nil {
4041 err = errors .Wrap (err , "unable to execute insert for org" )
@@ -43,13 +44,14 @@ func (s Store) AddOrganization(ctx domain.RequestContext, o org.Organization) (e
4344 return nil
4445}
4546
46- // GetOrganization returns the Organization reocrod from the organization database table with the given id.
47+ // GetOrganization returns the Organization record from the organization database table with the given id.
4748func (s Store ) GetOrganization (ctx domain.RequestContext , id string ) (org org.Organization , err error ) {
4849 err = s .Runtime .Db .Get (& org , s .Bind (`SELECT id, c_refid AS refid,
4950 c_title AS title, c_message AS message, c_domain AS domain,
5051 c_service AS conversionendpoint, c_email AS email, c_serial AS serial, c_active AS active,
5152 c_anonaccess AS allowanonymousaccess, c_authprovider AS authprovider,
52- coalesce(c_authconfig,` + s .EmptyJSON ()+ `) AS authconfig, coalesce(c_sub,` + s .EmptyJSON ()+ `) AS subscription,
53+ coalesce(c_authconfig,` + s .EmptyJSON ()+ `) AS authconfig,
54+ coalesce(c_sub,` + s .EmptyJSON ()+ `) AS subscription,
5355 c_maxtags AS maxtags, c_created AS created, c_revised AS revised
5456 FROM dmz_org
5557 WHERE c_refid=?` ),
@@ -80,7 +82,8 @@ func (s Store) GetOrganizationByDomain(subdomain string) (o org.Organization, er
8082 c_title AS title, c_message AS message, c_domain AS domain,
8183 c_service AS conversionendpoint, c_email AS email, c_serial AS serial, c_active AS active,
8284 c_anonaccess AS allowanonymousaccess, c_authprovider AS authprovider,
83- coalesce(c_authconfig,` + s .EmptyJSON ()+ `) AS authconfig, coalesce(c_sub,` + s .EmptyJSON ()+ `) AS subscription,
85+ coalesce(c_authconfig,` + s .EmptyJSON ()+ `) AS authconfig,
86+ coalesce(c_sub,` + s .EmptyJSON ()+ `) AS subscription,
8487 c_maxtags AS maxtags, c_created AS created, c_revised AS revised
8588 FROM dmz_org
8689 WHERE c_domain=? AND c_active=true` ),
@@ -95,7 +98,8 @@ func (s Store) GetOrganizationByDomain(subdomain string) (o org.Organization, er
9598 c_title AS title, c_message AS message, c_domain AS domain,
9699 c_service AS conversionendpoint, c_email AS email, c_serial AS serial, c_active AS active,
97100 c_anonaccess AS allowanonymousaccess, c_authprovider AS authprovider,
98- coalesce(c_authconfig,` + s .EmptyJSON ()+ `) AS authconfig, coalesce(c_sub,` + s .EmptyJSON ()+ `) AS subscription,
101+ coalesce(c_authconfig,` + s .EmptyJSON ()+ `) AS authconfig,
102+ coalesce(c_sub,` + s .EmptyJSON ()+ `) AS subscription,
99103 c_maxtags AS maxtags, c_created AS created, c_revised AS revised
100104 FROM dmz_org
101105 WHERE c_domain='' AND c_active=true` ))
0 commit comments