How do I convert a friendly ID to a database ID?
Objective: This article explains how to convert a friendly ID (e.g 123-A
) to a database ID (e.g users/123-A
).
Example:
import { collections } from '@hectare/platform.components.common'
const friendlyId = '123-A'
const userId = collections.users.id(friendlyId)
Related Articles: