-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(cb): orgs * remove dead imports * feat: schema changes for orgs * iterate * fix * fix test * build fixin --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
34456e1
commit d6caa19
Showing
77 changed files
with
790 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@coursebuilder/adapter-drizzle": major | ||
"utils": major | ||
"@coursebuilder/core": major | ||
"@coursebuilder/ui": major | ||
--- | ||
|
||
adds organizations for multi-tenant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
"epic-web", | ||
"pro-nextjs", | ||
"astro-party", | ||
"js-visualized", | ||
"egghead", | ||
"epic-react", | ||
"ai-hero", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
import { z } from 'zod' | ||
|
||
import { ContentResourceResourceSchema } from '@coursebuilder/core/schemas/content-resource-schema' | ||
import { | ||
ContentResourceResourceSchema, | ||
ContentResourceSchema, | ||
} from '@coursebuilder/core/schemas/content-resource-schema' | ||
|
||
export const LessonSchema = z.object({ | ||
id: z.string(), | ||
type: z.string(), | ||
createdById: z.string(), | ||
createdAt: z.coerce.date().nullable(), | ||
updatedAt: z.coerce.date().nullable(), | ||
deletedAt: z.coerce.date().nullable(), | ||
fields: z.object({ | ||
title: z.string().min(2).max(90), | ||
body: z.string().optional(), | ||
slug: z.string(), | ||
description: z.string().optional(), | ||
state: z | ||
.enum(['draft', 'published', 'archived', 'deleted']) | ||
.default('draft'), | ||
visibility: z.enum(['public', 'private', 'unlisted']).default('unlisted'), | ||
github: z.string().optional(), | ||
gitpod: z.string().optional(), | ||
export const LessonSchema = ContentResourceSchema.merge( | ||
z.object({ | ||
id: z.string(), | ||
type: z.string(), | ||
createdById: z.string(), | ||
createdAt: z.coerce.date().nullable(), | ||
updatedAt: z.coerce.date().nullable(), | ||
deletedAt: z.coerce.date().nullable(), | ||
fields: z.object({ | ||
title: z.string().min(2).max(90), | ||
body: z.string().optional(), | ||
slug: z.string(), | ||
description: z.string().optional(), | ||
state: z | ||
.enum(['draft', 'published', 'archived', 'deleted']) | ||
.default('draft'), | ||
visibility: z.enum(['public', 'private', 'unlisted']).default('unlisted'), | ||
github: z.string().optional(), | ||
gitpod: z.string().optional(), | ||
}), | ||
resources: z.array(ContentResourceResourceSchema).default([]).nullable(), | ||
}), | ||
resources: z.array(ContentResourceResourceSchema).default([]).nullable(), | ||
}) | ||
) | ||
|
||
export type Lesson = z.infer<typeof LessonSchema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import { GET as authGet, POST as authPost } from '@/server/auth' | ||
import { withSkill } from '@/server/with-skill' | ||
|
||
export const GET = withSkill(authGet) | ||
export const POST = withSkill(authPost) | ||
export const GET = authGet | ||
export const POST = authPost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.