headplane/app/utils/res.ts

10 lines
221 B
TypeScript
Raw Normal View History

2024-12-31 10:30:14 +05:30
import { data } from 'react-router';
2024-12-06 11:58:17 -05:00
export function send<T>(payload: T, init?: number | ResponseInit) {
2024-12-31 10:30:14 +05:30
return data(payload, init);
2024-12-06 11:58:17 -05:00
}
2025-02-13 12:35:12 -05:00
export function send401<T>(payload: T) {
return data(payload, { status: 401 });
}