@coursebuilder/adapter-drizzle 0.1.0 → 0.1.1
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/dist/lib/mysql/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coursebuilder/adapter-drizzle",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Drizzle adapter for Course Builder.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coursebuilder",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@auth/core": "^0.28.1",
|
|
43
|
-
"@coursebuilder/core": "0.1.
|
|
43
|
+
"@coursebuilder/core": "0.1.1",
|
|
44
44
|
"@libsql/client": "0.5.6",
|
|
45
45
|
"@types/better-sqlite3": "7.6.9",
|
|
46
46
|
"@types/uuid": "9.0.8",
|
package/src/lib/mysql/index.ts
CHANGED
|
@@ -856,7 +856,13 @@ export function mySqlDrizzleAdapter(
|
|
|
856
856
|
},
|
|
857
857
|
async getContentResource(data) {
|
|
858
858
|
const resource = await client.query.contentResource.findFirst({
|
|
859
|
-
where:
|
|
859
|
+
where: or(
|
|
860
|
+
eq(contentResource.id, data),
|
|
861
|
+
eq(
|
|
862
|
+
sql`JSON_EXTRACT (${contentResource.fields}, "$.slug")`,
|
|
863
|
+
`${data}`,
|
|
864
|
+
),
|
|
865
|
+
),
|
|
860
866
|
with: {
|
|
861
867
|
resources: {
|
|
862
868
|
with: {
|