mirror of
https://github.com/standardnotes/server
synced 2026-10-11 21:13:12 -04:00
tmp: disable decorating items completely
This commit is contained in:
@@ -8,7 +8,7 @@ export class GetItem implements UseCaseInterface<Item> {
|
||||
constructor(private itemRepository: ItemRepositoryInterface) {}
|
||||
|
||||
async execute(dto: GetItemDTO): Promise<Result<Item>> {
|
||||
const item = await this.itemRepository.findByUuidAndUserUuid(dto.itemUuid, dto.userUuid)
|
||||
const item = await this.itemRepository.findByUuidAndUserUuid(dto.itemUuid, dto.userUuid, true)
|
||||
|
||||
if (item === null) {
|
||||
return Result.fail(`Could not find item with uuid ${dto.itemUuid}`)
|
||||
|
||||
@@ -56,11 +56,14 @@ export class GetItems implements UseCaseInterface<GetItemsResult> {
|
||||
)
|
||||
let items: Array<Item> = []
|
||||
if (itemUuidsToFetch.length > 0) {
|
||||
items = await this.itemRepository.findAll({
|
||||
uuids: itemUuidsToFetch,
|
||||
sortBy: 'updated_at_timestamp',
|
||||
sortOrder: 'ASC',
|
||||
})
|
||||
items = await this.itemRepository.findAll(
|
||||
{
|
||||
uuids: itemUuidsToFetch,
|
||||
sortBy: 'updated_at_timestamp',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
true,
|
||||
)
|
||||
}
|
||||
const totalItemsCount = await this.itemRepository.countAll(itemQuery)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export class SaveItems implements UseCaseInterface<SaveItemsResult> {
|
||||
}
|
||||
const itemUuid = itemUuidOrError.getValue()
|
||||
|
||||
const existingItem = await this.itemRepository.findByUuid(itemUuid, false)
|
||||
const existingItem = await this.itemRepository.findByUuid(itemUuid, true)
|
||||
|
||||
if (dto.readOnlyAccess) {
|
||||
conflicts.push({
|
||||
|
||||
@@ -126,12 +126,15 @@ export class SyncItems implements UseCaseInterface<SyncItemsResponse> {
|
||||
}
|
||||
|
||||
private async frontLoadKeysItemsToTop(userUuid: string, retrievedItems: Array<Item>): Promise<Array<Item>> {
|
||||
const itemsKeys = await this.itemRepository.findAll({
|
||||
userUuid,
|
||||
contentType: ContentType.TYPES.ItemsKey,
|
||||
sortBy: 'updated_at_timestamp',
|
||||
sortOrder: 'ASC',
|
||||
})
|
||||
const itemsKeys = await this.itemRepository.findAll(
|
||||
{
|
||||
userUuid,
|
||||
contentType: ContentType.TYPES.ItemsKey,
|
||||
sortBy: 'updated_at_timestamp',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
true,
|
||||
)
|
||||
|
||||
const retrievedItemsIds: Array<string> = retrievedItems.map((item: Item) => item.id.toString())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user