대충이런느낌
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { GET } from "../defs";
|
||||
import { GET, ngGET } from "../defs";
|
||||
import type { structure } from "../../apiStructure/sammoRootAPI";
|
||||
import type { ExtractError, ExtractQuery, ExtractResponse } from "../../apiStructure/defs";
|
||||
|
||||
@@ -7,13 +7,8 @@ type RType = ExtractResponse<BaseAPI>;
|
||||
type EType = ExtractError<BaseAPI>;
|
||||
type QType = ExtractQuery<BaseAPI>;
|
||||
|
||||
export class test extends GET<RType, EType, QType>{
|
||||
readonly argValidator = undefined;
|
||||
protected ReqNonce = Symbol("ReqNonce");//TODO: remove this
|
||||
protected override async api(query: QType): Promise<RType | EType | true> {
|
||||
return {
|
||||
hello: "world",
|
||||
result: true,
|
||||
}
|
||||
export const test = ngGET<RType, EType, QType>(undefined)(undefined)(
|
||||
(query, ctx, req, res) => {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user