mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
getOrganisationBySlug
This commit is contained in:
@@ -35,6 +35,11 @@ export async function getOrganisationById(id: number) {
|
||||
return organisation;
|
||||
}
|
||||
|
||||
export async function getOrganisationBySlug(slug: string) {
|
||||
const [organisation] = await db.select().from(Organisation).where(eq(Organisation.slug, slug));
|
||||
return organisation;
|
||||
}
|
||||
|
||||
export async function getOrganisationsByUserId(userId: number) {
|
||||
const organisations = await db
|
||||
.select()
|
||||
|
||||
Reference in New Issue
Block a user