@gigamusic/links 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/api/handlers.ts +1 -1
- package/src/api/validation.ts +3 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gigamusic/links",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Editable Linktree-style link pages for gigamusic artist sites. Ships a Drizzle schema, admin API handler factories, and platform-detection helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@gigamusic/core": "1.0.0",
|
|
35
|
-
"@gigamusic/db": "2.0
|
|
35
|
+
"@gigamusic/db": "2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"drizzle-orm": ">=0.45",
|
package/src/api/handlers.ts
CHANGED
|
@@ -68,7 +68,7 @@ export function createAdminLinkPagesHandlers(deps: LinkPagesAdminDeps): {
|
|
|
68
68
|
POST: RouteHandler<Record<string, never>>;
|
|
69
69
|
} {
|
|
70
70
|
return {
|
|
71
|
-
GET: async (
|
|
71
|
+
GET: async (_req) => {
|
|
72
72
|
const pages = await deps.queries.listAllLinkPages();
|
|
73
73
|
return json(pages);
|
|
74
74
|
},
|
package/src/api/validation.ts
CHANGED
|
@@ -5,11 +5,6 @@ export const INVALID_SLUG_MESSAGE =
|
|
|
5
5
|
"Slug must be lowercase letters, numbers, and dashes";
|
|
6
6
|
export const RESERVED_SLUG_MESSAGE = "Slug is reserved";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
typeof err === "object" &&
|
|
12
|
-
err !== null &&
|
|
13
|
-
(err as { code?: string }).code === "23505"
|
|
14
|
-
);
|
|
15
|
-
}
|
|
8
|
+
// Re-exported from `@gigamusic/db` so existing consumers of
|
|
9
|
+
// `@gigamusic/links`' `isUniqueConstraintError` keep working unchanged.
|
|
10
|
+
export { isUniqueConstraintError } from "@gigamusic/db";
|