Split services into core and request

This commit is contained in:
2026-01-17 16:19:32 -06:00
parent e59bb35ac9
commit 8a7682e953
12 changed files with 76 additions and 73 deletions

View File

@@ -1,8 +1,8 @@
import { SESSION_COOKIE_NAME } from "../auth/token";
import { tokenLifetimes } from "../auth/types";
import { services } from "../services";
import type { Call, Result, Route } from "../types";
import { request } from "../request";
import { html, redirect, render } from "../request/util";
import type { Call, Result, Route } from "../types";
const loginHandler = async (call: Call): Promise<Result> => {
if (call.method === "GET") {
@@ -21,7 +21,7 @@ const loginHandler = async (call: Call): Promise<Result> => {
return html(c);
}
const result = await services.auth.login(email, password, "cookie", {
const result = await request.auth.login(email, password, "cookie", {
userAgent: call.request.get("User-Agent"),
ipAddress: call.request.ip,
});