Skip to content

Commit 03e6a1d

Browse files
committed
fix(node): folder & password order
1 parent 922480d commit 03e6a1d

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

lavcode-node/ipare-cli.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { Configuration, defineConfig } from "@ipare/cli";
2-
import "@ipare/router/dist/cli-config";
1+
import { defineConfig } from "@ipare/cli";
32

43
export default defineConfig(() => {
5-
return {} as Configuration;
4+
return {};
65
});

lavcode-node/src/actions/folder/dtos/update-folder.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export class UpdateFolderDto {
88
@V().Required().IsNumber()
99
order!: number;
1010

11-
@V().Description("空则不修改图标")
11+
@V().IsOptional().Description("空则不修改图标")
1212
icon!: UpsertIconDto;
1313
}

lavcode-node/src/actions/folder/services/folder.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export class FolderService {
3131
.project({
3232
icons: 0,
3333
})
34+
.sort({
35+
order: 1,
36+
})
3437
.end();
3538
const folderEntities = res.data as (FolderEntity & {
3639
icon: IconEntity;

lavcode-node/src/actions/password/dtos/update-password.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export class UpdatePasswordDto {
1414
@V().Required()
1515
order!: string;
1616

17-
@V().Required()
17+
@V().IsOptional()
1818
icon!: UpsertIconDto;
19-
@V().Required().Items(UpsertKeyValuePair)
19+
@V().IsOptional().Items(UpsertKeyValuePair)
2020
keyValuePairs!: UpsertKeyValuePair[];
2121
}

lavcode-node/src/actions/password/services/password.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export class PasswordService {
3838
foreignField: "passwordId",
3939
as: "keyValuePairs",
4040
})
41+
.sort({
42+
order: 1,
43+
})
4144
.end();
4245
const passwordEntities = res.data as (PasswordEntity & {
4346
icon: IconEntity;

0 commit comments

Comments
 (0)