import GhostAdminAPI from '@tryghost/admin-api'
type Ghostcms = {
apiKey: string
apiUrl: string
}
export async function main(resource: Ghostcms, email: string) {
const apiClient = new GhostAdminAPI({
url: resource.apiUrl,
version: 'v5.87',
key: resource.apiKey
})
const response = await apiClient.users.browse()
const filteredResponse = response.find((user) => user.email === email)
return filteredResponse
}
Submitted by hugo697 652 days ago