Fix pagination query parsing, repertoire entry editor

This commit is contained in:
2024-12-30 11:02:07 +01:00
parent d7e6df14d4
commit fc64f77335
3 changed files with 236 additions and 27 deletions

View File

@@ -22,8 +22,8 @@ const SystemInformation = Object.freeze({
});
const Pagination = Object.freeze({
offset: t.Optional(t.Integer({ minimum: 0 })),
limit: t.Optional(t.Integer({ minimum: 1, maximum: 100 })),
offset: t.Optional(t.Numeric({ minimum: 0 })),
limit: t.Optional(t.Numeric({ minimum: 1, maximum: 100 })),
});
export const AccessLog = t.Object({
@@ -74,6 +74,11 @@ export const Repertoire = t.Object({
...SystemInformation,
});
export const Repertoire_Query = t.Object({
name: t.Optional(t.String()),
...Pagination,
});
export const User = t.Object({
userId: UserId,
username: t.String(),
@@ -103,6 +108,7 @@ export type Piece = typeof Piece.static;
export type Piece_Post = typeof Piece_Post.static;
export type Piece_Query = typeof Piece_Query.static;
export type Repertoire = typeof Repertoire.static;
export type Repertoire_Query = typeof Repertoire_Query.static;
export type User = typeof User.static;
export type User_Patch = typeof User_Patch.static;
export type User_Post = typeof User_Post.static;