mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
fix: package upgrade (#2777)
Upgraded some packages to latest. This should resolve #2774. Fixes were also applied after types upgrades that helped discover other errors.
This commit is contained in:
@@ -70,7 +70,7 @@ export interface Comment extends TenantResource {
|
||||
/**
|
||||
* authorID stores the ID of the User that created this Comment.
|
||||
*/
|
||||
authorID: string;
|
||||
authorID: string | null;
|
||||
|
||||
/**
|
||||
* storyID stores the ID of the Story that this Comment was left on.
|
||||
@@ -319,7 +319,7 @@ export async function editComment(
|
||||
status: {
|
||||
$in: EDITABLE_STATUSES,
|
||||
},
|
||||
deletedAt: null,
|
||||
deletedAt: undefined,
|
||||
createdAt: {
|
||||
$gt: lastEditableCommentCreatedAt,
|
||||
},
|
||||
|
||||
@@ -154,14 +154,7 @@ export async function retrieveSharedModerationQueueQueuesCounts(
|
||||
const key = commentCountsModerationQueueQueuesKey(tenantID);
|
||||
const freshKey = freshenKey(key);
|
||||
|
||||
// Get the values, and the freshness key.
|
||||
const [[, queues], [, fresh]]: [
|
||||
[
|
||||
Error | undefined,
|
||||
Record<keyof CommentModerationCountsPerQueue, string> | null
|
||||
],
|
||||
[Error | undefined, string | null]
|
||||
] = await redis
|
||||
const [[, fresh], [, queues]] = await redis
|
||||
.pipeline()
|
||||
.hgetall(key)
|
||||
.get(freshKey)
|
||||
|
||||
@@ -223,7 +223,10 @@ export async function retrieveTenant(mongo: Db, id: string) {
|
||||
return collection(mongo).findOne({ id });
|
||||
}
|
||||
|
||||
export async function retrieveManyTenants(mongo: Db, ids: string[]) {
|
||||
export async function retrieveManyTenants(
|
||||
mongo: Db,
|
||||
ids: ReadonlyArray<string>
|
||||
) {
|
||||
const cursor = collection(mongo).find({
|
||||
id: {
|
||||
$in: ids,
|
||||
|
||||
Reference in New Issue
Block a user