|
|
@ -110,22 +110,7 @@ function appsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRespon |
|
|
|
const container = containerFor(server.database.client, 'Apps') |
|
|
|
|
|
|
|
const { resources: apps, requestCharge, continuation: newContinuation } = await container.items.query<App>( |
|
|
|
`SELECT
|
|
|
|
a.id, |
|
|
|
a.userId, |
|
|
|
a.version, |
|
|
|
a.name, |
|
|
|
a.imageUrl, |
|
|
|
a.coverImageUrl, |
|
|
|
a.iconImageUrl, |
|
|
|
a.about, |
|
|
|
a.websiteUrl, |
|
|
|
a.companyName, |
|
|
|
a.rating, |
|
|
|
a.users, |
|
|
|
a.created |
|
|
|
FROM Apps a |
|
|
|
WHERE a.pk = '${APP_PARTITION_KEY}' AND a.active = true ORDER BY a.${sort}`,
|
|
|
|
`SELECT * FROM Apps a WHERE a.pk = '${APP_PARTITION_KEY}' AND a.active = true ORDER BY a.${sort}`, |
|
|
|
{ |
|
|
|
maxItemCount: 40, |
|
|
|
continuation, |
|
|
@ -185,21 +170,7 @@ function selfAppsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRe |
|
|
|
const container = containerFor(server.database.client, 'Apps') |
|
|
|
|
|
|
|
const { resources: apps, requestCharge } = await container.items.query<App>( |
|
|
|
`SELECT
|
|
|
|
a.id, |
|
|
|
a.version, |
|
|
|
a.name, |
|
|
|
a.imageUrl, |
|
|
|
a.coverImageUrl, |
|
|
|
a.iconImageUrl, |
|
|
|
a.about, |
|
|
|
a.websiteUrl, |
|
|
|
a.companyName |
|
|
|
a.rating, |
|
|
|
a.users, |
|
|
|
a.created |
|
|
|
FROM Apps a |
|
|
|
WHERE a.pk = '${APP_PARTITION_KEY}' AND a.userId = ${request.viewer.id} ORDER BY a.${sort}`,
|
|
|
|
`SELECT * FROM Apps a WHERE a.pk = '${APP_PARTITION_KEY}' AND a.userId = ${request.viewer.id} ORDER BY a.${sort}`, |
|
|
|
{} |
|
|
|
).fetchAll() |
|
|
|
|
|
|
|