Skip to content

Commit a85e87c

Browse files
committed
fix: update platforms type in SyncData interface
- Changed platforms type from string[] to PlatformInfo[] in extension.ts. - Updated post function in PostInfo.vue to reflect the new platforms structure.
1 parent 5db3dac commit a85e87c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/CodemirrorEditor/EditorHeader/PostInfo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function toRaw<T extends object>(obj: T): T {
128128
129129
function post() {
130130
const sdata: SyncData = {
131-
platforms: selectedAccounts.value.map(account => account.name),
131+
platforms: selectedAccounts.value,
132132
auto_publish: false,
133133
data: toRaw(form.value),
134134
}

src/utils/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function openOptions(timeout: number = 5000): Promise<boolean> {
8888
}
8989

9090
export interface SyncData {
91-
platforms: string[]
91+
platforms: PlatformInfo[]
9292
auto_publish: boolean
9393
data: DynamicData | ArticleData | VideoData
9494
}

0 commit comments

Comments
 (0)