MCPcopy Create free account
hub / github.com/SecureAI-Tools/SecureAI-Tools / getChatMessagesApiPath

Function getChatMessagesApiPath

apps/web/lib/fe/api-paths.ts:122–138  ·  view source on GitHub ↗
({
  chatId,
  ordering = {
    orderBy: "createdAt",
    order: "asc",
  },
  pagination = {
    page: 1,
    pageSize: 10,
  },
}: {
  chatId: Id<ChatResponse>;
  ordering?: OrderingParams;
  pagination?: PaginationParams;
})

Source from the content-addressed store, hash-verified

120};
121
122export const getChatMessagesApiPath = ({
123 chatId,
124 ordering = {
125 orderBy: "createdAt",
126 order: "asc",
127 },
128 pagination = {
129 page: 1,
130 pageSize: 10,
131 },
132}: {
133 chatId: Id<ChatResponse>;
134 ordering?: OrderingParams;
135 pagination?: PaginationParams;
136}): string => {
137 return `/api/chats/${chatId}/messages?orderBy=${ordering.orderBy}&order=${ordering.order}&page=${pagination.page}&pageSize=${pagination.pageSize}`;
138};
139
140export const chatTitleApiPath = (chatId: Id<ChatResponse>): string => {
141 return `/api/chats/${chatId}/title`;

Callers 2

ChatFunction · 0.90
ChatPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected