mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
fix: resolve typecheck errors in api and config
This commit is contained in:
@@ -596,6 +596,10 @@ async function usersPostRouterV1Handler(ctx: ActionCtx, request: Request) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!role) {
|
||||
return text('Invalid role', 400, rate.headers)
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await ctx.runMutation(internal.users.setRoleInternal, {
|
||||
actorUserId,
|
||||
|
||||
+2
-1
@@ -73,7 +73,8 @@ const HARD_DELETE_PHASES = [
|
||||
type HardDeletePhase = (typeof HARD_DELETE_PHASES)[number]
|
||||
|
||||
function isHardDeletePhase(value: string | undefined): value is HardDeletePhase {
|
||||
return Boolean(value) && (HARD_DELETE_PHASES as readonly string[]).includes(value)
|
||||
if (!value) return false
|
||||
return (HARD_DELETE_PHASES as readonly string[]).includes(value)
|
||||
}
|
||||
|
||||
async function scheduleHardDelete(
|
||||
|
||||
@@ -75,11 +75,6 @@ const config = defineConfig({
|
||||
onwarn: handleRollupWarning,
|
||||
},
|
||||
},
|
||||
ssr: {
|
||||
rollupOptions: {
|
||||
onwarn: handleRollupWarning,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
export default config
|
||||
|
||||
Reference in New Issue
Block a user