From eb7afc945def0b4b71c64a21354c1b60970e2495 Mon Sep 17 00:00:00 2001 From: cuixiaorui Date: Mon, 19 Aug 2024 22:22:55 +0800 Subject: [PATCH] release(game-data-sdk): v1.0.11 --- packages/game-data-sdk/package.json | 2 +- packages/game-data-sdk/src/course-pack/course-pack.model.ts | 1 + packages/game-data-sdk/src/course-pack/course-pack.service.ts | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/game-data-sdk/package.json b/packages/game-data-sdk/package.json index 859c11262..f838bd3e6 100644 --- a/packages/game-data-sdk/package.json +++ b/packages/game-data-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@earthworm/game-data-sdk", - "version": "1.0.10", + "version": "1.0.11", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/game-data-sdk/src/course-pack/course-pack.model.ts b/packages/game-data-sdk/src/course-pack/course-pack.model.ts index ce7dd9893..376d5ac8a 100644 --- a/packages/game-data-sdk/src/course-pack/course-pack.model.ts +++ b/packages/game-data-sdk/src/course-pack/course-pack.model.ts @@ -8,6 +8,7 @@ interface Course { title: string; description: string; statements: Statement[]; + learningContent: string; } export interface CreateCoursePack { diff --git a/packages/game-data-sdk/src/course-pack/course-pack.service.ts b/packages/game-data-sdk/src/course-pack/course-pack.service.ts index 66ada11eb..340ec1114 100644 --- a/packages/game-data-sdk/src/course-pack/course-pack.service.ts +++ b/packages/game-data-sdk/src/course-pack/course-pack.service.ts @@ -36,6 +36,7 @@ export async function createCoursePack(coursePackInfo: CreateCoursePack) { order: cIndex + 1, title: course.title, description: course.description, + learningContent: course.learningContent, }) .returning({ id: courseSchema.id, @@ -154,6 +155,7 @@ export async function updateCoursePack(coursePackId: string, coursePackInfo: Upd title: newCourseInfo.title, description: newCourseInfo.description, order: newCourseIndex + 1, + learningContent: newCourseInfo.learningContent, }) .where(eq(courseSchema.id, newCourseInfo.publishCourseId)); @@ -170,6 +172,7 @@ export async function updateCoursePack(coursePackId: string, coursePackInfo: Upd description: newCourseInfo.description, order: newCourseIndex + 1, coursePackId: coursePackId, + learningContent: newCourseInfo.learningContent, }) .returning({ id: courseSchema.id,