Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 4ea6fc3

Browse files
Merge pull request #352 from deckgo/publish_description
feat(#351): pass description to the publish
2 parents a6787c4 + 886a0f7 commit 4ea6fc3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

studio/src/app/models/api/api.deck.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export interface ApiDeck {
55
id?: string;
66
slides: ApiSlide[];
77
name: string;
8+
description: string;
89
owner_id: string;
910
attributes?: DeckAttributes;
1011
background?: string;

studio/src/app/services/editor/publish/publish.service.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class PublishService {
7878
return;
7979
}
8080

81-
const apiDeck: ApiDeck = await this.convertDeck(deck);
81+
const apiDeck: ApiDeck = await this.convertDeck(deck, description);
8282

8383
this.progress(0.25);
8484

@@ -136,13 +136,14 @@ export class PublishService {
136136
}
137137
}
138138

139-
private convertDeck(deck: Deck): Promise<ApiDeck> {
139+
private convertDeck(deck: Deck, description: string): Promise<ApiDeck> {
140140
return new Promise<ApiDeck>(async (resolve, reject) => {
141141
try {
142142
const apiSlides: ApiSlide[] = await this.convertSlides(deck);
143143

144144
const apiDeck: ApiDeck = {
145145
name: deck.data.name,
146+
description: description !== undefined && description !== '' ? description : deck.data.name,
146147
owner_id: deck.data.owner_id,
147148
attributes: deck.data.attributes,
148149
background: deck.data.background,

0 commit comments

Comments
 (0)