UNPKG

rprcli

Version:

Reaper.js is a powerful TypeScript-based framework designed to streamline backend development. It offers built-in database migrations, seeders, and SQL query utilities, making it easy to manage data efficiently. With native support for TSX and JSX renderi

43 lines (39 loc) 753 B
class Auth{ req constructor(req){ this.req = req; } async login(credentials){ } async logout(){ } } module.exports = class ReaperRequest{ req data = {} headers = ()=>{ this.req.headers; }; cookies = ()=>{ this.req.cookies; }; user = async()=>{ const authHeader = this.req.headers.authorization; return { id:"" }; }; auth params = {} constructor(req,params){ this.params = params this.auth = new Auth(req); this.req = req; if(req.method == "GET"){ this.data=req.query; } if(req.method == "POST"){ this.data=req.body; } } }