(udoc: Udoc, dudoc, scope: bigint = PERM.PERM_ALL)
| 191 | } |
| 192 | |
| 193 | async function initAndCache(udoc: Udoc, dudoc, scope: bigint = PERM.PERM_ALL) { |
| 194 | const res = await new User(udoc, dudoc, scope).init(); |
| 195 | cache.set(`id/${udoc._id}/${dudoc.domainId}`, res); |
| 196 | cache.set(`name/${udoc.unameLower}/${dudoc.domainId}`, res); |
| 197 | cache.set(`mail/${udoc.mailLower}/${dudoc.domainId}`, res); |
| 198 | return res; |
| 199 | } |
| 200 | |
| 201 | class UserModel { |
| 202 | static coll = coll; |
no test coverage detected