mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
getOrganisationBySlug
This commit is contained in:
@@ -35,6 +35,11 @@ export async function getOrganisationById(id: number) {
|
|||||||
return organisation;
|
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) {
|
export async function getOrganisationsByUserId(userId: number) {
|
||||||
const organisations = await db
|
const organisations = await db
|
||||||
.select()
|
.select()
|
||||||
|
|||||||
Reference in New Issue
Block a user