review: fixed function name

This commit is contained in:
Wyatt Johnson
2018-10-31 17:57:21 -06:00
parent 092e707785
commit f39da1f76b
4 changed files with 8 additions and 8 deletions
@@ -3,7 +3,7 @@ import { Profile, Strategy } from "passport-facebook";
import { Config } from "talk-common/config";
import OAuth2Strategy from "talk-server/app/middleware/passport/strategies/oauth2";
import { reconstructTenantURL } from "talk-server/app/url";
import { constructTenantURL } from "talk-server/app/url";
import {
GQLAuthIntegrations,
GQLFacebookAuthIntegration,
@@ -90,7 +90,7 @@ export default class FacebookStrategy extends OAuth2Strategy<
{
clientID: integration.clientID,
clientSecret: integration.clientSecret,
callbackURL: reconstructTenantURL(
callbackURL: constructTenantURL(
this.config,
tenant,
"/api/tenant/auth/facebook/callback"
@@ -3,7 +3,7 @@ import { Profile, Strategy } from "passport-google-oauth2";
import { Config } from "talk-common/config";
import OAuth2Strategy from "talk-server/app/middleware/passport/strategies/oauth2";
import { reconstructTenantURL } from "talk-server/app/url";
import { constructTenantURL } from "talk-server/app/url";
import {
GQLAuthIntegrations,
GQLGoogleAuthIntegration,
@@ -103,7 +103,7 @@ export default class GoogleStrategy extends OAuth2Strategy<
{
clientID: integration.clientID,
clientSecret: integration.clientSecret,
callbackURL: reconstructTenantURL(
callbackURL: constructTenantURL(
this.config,
tenant,
"/api/tenant/auth/google/callback"
+2 -2
View File
@@ -14,9 +14,9 @@ export function reconstructURL(req: Request, path: string = "/"): string {
}
/**
* reconstructTenantURL will reconstruct a URL based off of the Tenant's domain.
* constructTenantURL will construct a URL based off of the Tenant's domain.
*/
export function reconstructTenantURL(
export function constructTenantURL(
config: Config,
tenant: Pick<Tenant, "domain">,
path: string = "/"
@@ -1,4 +1,4 @@
import { reconstructTenantURL, reconstructURL } from "talk-server/app/url";
import { constructTenantURL, reconstructURL } from "talk-server/app/url";
import {
GQLOIDCAuthIntegration,
GQLOIDCAuthIntegrationTypeResolver,
@@ -19,7 +19,7 @@ const OIDCAuthIntegration: GQLOIDCAuthIntegrationTypeResolver<
// Note that when constructing the callback url with the tenant, the port
// information is lost.
return reconstructTenantURL(ctx.config, ctx.tenant, path);
return constructTenantURL(ctx.config, ctx.tenant, path);
},
};