Skip to content

Commit

Permalink
feature userAccessPolicy: code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
light-source committed Jan 9, 2025
1 parent a227d18 commit 93ed707
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import { type ApiResponse, RegisterSitekeyBody } from "@prosopo/types";
import type { z } from "zod";
import {
type ApiResponse,
RegisterSitekeyBody,
type RegisterSitekeyBodyTypeOutput,
} from "@prosopo/types";
import type { ClientTaskManager } from "../../../tasks/client/clientTasks.js";
import type { Endpoint } from "../../interfaces/endpoint/endpoint.js";

class RegisterSiteKeyEndpoint implements Endpoint<typeof RegisterSitekeyBody> {
public constructor(private readonly clientTaskManager: ClientTaskManager) {}

async processRequest(
args: z.infer<typeof RegisterSitekeyBody>,
args: RegisterSitekeyBodyTypeOutput,
): Promise<ApiResponse> {
const { siteKey, settings } = args;

Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/provider/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ export const RegisterSitekeyBody = object({
}).optional(),
});

export type RegisterSitekeyBodyTypeOutput = output<typeof RegisterSitekeyBody>;

export const ProsopoCaptchaCountConfigSchema = object({
solved: object({
count: number().positive(),
Expand Down

0 comments on commit 93ed707

Please sign in to comment.