mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-26 23:06:37 +00:00
add site targets, client resources, and auto login
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import { z } from "zod";
|
||||
import { db } from "@server/db";
|
||||
import { db, Target } from "@server/db";
|
||||
import { targets } from "@server/db";
|
||||
import { eq } from "drizzle-orm";
|
||||
import response from "@server/lib/response";
|
||||
@@ -16,6 +16,8 @@ const getTargetSchema = z
|
||||
})
|
||||
.strict();
|
||||
|
||||
type GetTargetResponse = Target;
|
||||
|
||||
registry.registerPath({
|
||||
method: "get",
|
||||
path: "/target/{targetId}",
|
||||
@@ -60,7 +62,7 @@ export async function getTarget(
|
||||
);
|
||||
}
|
||||
|
||||
return response(res, {
|
||||
return response<GetTargetResponse>(res, {
|
||||
data: target[0],
|
||||
success: true,
|
||||
error: false,
|
||||
|
||||
Reference in New Issue
Block a user