Split services into core and request
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user