augmenttoolkit / server /src /services /tripAccess.ts
Leon4gr45's picture
Upload folder using huggingface_hub (part 5)
57a889c verified
Raw
History Blame Contribute Delete
334 Bytes
import { canAccessTrip } from '../db/database';
/**
* Returns the trip row if the user is the owner or a member, otherwise undefined.
* Shared by the domain services so each one exposes the same access check.
*/
export function verifyTripAccess(tripId: string | number, userId: number) {
return canAccessTrip(tripId, userId);
}