silverwolf-x's picture
download
raw
284 Bytes
import { cookies } from 'next/headers'
export function validator(action) {
return async function (arg) {
'use server'
const auth = (await cookies()).get('auth')
if (auth?.value !== '1') {
throw new Error('Unauthorized request')
}
return action(arg)
}
}

Xet Storage Details

Size:
284 Bytes
·
Xet hash:
378df3e8d78566c10928d7703dfb7cdf2da5e0c62b0108ba3052e662c8b21bbc

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.