tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
don't redirect on name change for pubs
awarm.space
4 months ago
016b2e1d
abbe0480
-7
1 changed file
expand all
collapse all
unified
split
app
lish
createPub
updatePublication.ts
-7
app/lish/createPub/updatePublication.ts
···
10
10
import { supabaseServerClient } from "supabase/serverClient";
11
11
import { Json } from "supabase/database.types";
12
12
import { AtUri } from "@atproto/syntax";
13
13
-
import { redirect } from "next/navigation";
14
13
import { $Typed } from "@atproto/api";
15
15
-
import { ids } from "lexicons/api/lexicons";
16
14
17
15
export async function updatePublication({
18
16
uri,
···
87
85
.eq("uri", uri)
88
86
.select()
89
87
.single();
90
90
-
if (name !== existingPub.name)
91
91
-
return redirect(
92
92
-
`/lish/${aturi.host}/${encodeURIComponent(name)}/dashboard`,
93
93
-
);
94
94
-
95
88
return { success: true, publication };
96
89
}
97
90