Skip to content

Commit f4a27f3

Browse files
committed
fix broken import
1 parent 554d871 commit f4a27f3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

utopia-remix/app/models/project.server.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ describe('project model', () => {
162162
})
163163
})
164164

165-
describe('getProjectOwnerById', () => {
165+
describe('getProjectOwnership', () => {
166166
beforeEach(async () => {
167167
await createTestUser(prisma, { id: 'bob' })
168168
await createTestUser(prisma, { id: 'alice' })

utopia-remix/app/routes/internal.projects.$id.permissions.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Params } from '@remix-run/react'
44
import { getAllPermissions } from '../services/permissionsService.server'
55
import { ALLOW } from '../handlers/validators'
66
import { Status } from '../util/statusCodes'
7-
import { getProjectOwnerById } from '../models/project.server'
7+
import { getProjectOwnership } from '../models/project.server'
88

99
export async function loader(args: LoaderFunctionArgs) {
1010
return handle(args, {
@@ -18,7 +18,7 @@ async function getUserProjectPermissions(req: Request, params: Params<string>) {
1818
const userId = user?.user_id ?? null
1919
const { id } = params
2020
ensure(id != null, 'projectId is null', Status.BAD_REQUEST)
21-
const ownerId = await getProjectOwnerById({ id: id })
22-
ensure(ownerId != null, `Project ${id} not found or has no owner`, Status.NOT_FOUND)
23-
return getAllPermissions(id, userId, ownerId)
21+
const ownership = await getProjectOwnership({ id: id })
22+
ensure(ownership != null, `Project ${id} not found or has no owner`, Status.NOT_FOUND)
23+
return getAllPermissions(id, userId, ownership.ownerId)
2424
}

0 commit comments

Comments
 (0)