()
| 20 | const authError = error("auth"); |
| 21 | |
| 22 | const requiresAdmin = () => |
| 23 | effected(function* () { |
| 24 | const user = yield* askUser(); |
| 25 | if (!user) return yield* authError("No user found"); |
| 26 | if (user.role !== "admin") return yield* authError(`User ${user.name} is not an admin`); |
| 27 | }); |
| 28 | |
| 29 | const fetchAdminData = () => |
| 30 | effected(function* () { |
no test coverage detected