Skip to content

Commit cba2ffe

Browse files
authored
Merge pull request #229 from ddxv/main
strip landing page of https:// as it will be handled later
2 parents ded3d63 + ced0446 commit cba2ffe

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

apps/dash-backend/dbcon/sql/app_links.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- NOTE: This has a sibling query in postback-api
12
SELECT
23
al.id as db_id,
34
d.domain_url as domain_url,

apps/dash-frontend/src/schemas.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export const linkSchema = z.object({
1313
.regex(/^[a-zA-Z0-9-_]+$/, {
1414
message: 'Share slug can only contain alphanumeric characters, dashes, and underscores.'
1515
}),
16-
webLandingPage: z.string().min(2).max(1000),
16+
webLandingPage: z
17+
.string()
18+
.min(2)
19+
.max(1000)
20+
.transform((val) => val.replace(/^https?:\/\//, '').replace(/^http?:\/\//, '')),
1721
networkId: z.number(),
1822
// networkName: z.string(), // Used for display
1923
campaignName: z.string().min(2).max(100),

apps/postback-api/api_app/controllers/share.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ async def shared_link(
228228
logger.error(
229229
f"Redirect links empty! Set share link on dashboard. No redirect found for {share_slug}",
230230
)
231+
# TODO: Attempts to redirect ot the root of the share url with possibly no landing page
231232
return Redirect(path="/")
232233

233234
redirect_url, detected_os = get_redirect_url(

apps/postback-api/dbcon/sql/app_links.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- NOTE: This has a sibling query in dash-backend
12
SELECT
23
al.id as db_id,
34
d.domain_url as domain_url,

0 commit comments

Comments
 (0)