osuny-owl 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -304,11 +304,12 @@ export class OsunyUtility{
|
|
|
304
304
|
* @param {string} migration_identifier (Required) A unique identifier to catch its migration in the logs
|
|
305
305
|
* @param {Array} blocks (Required) Array of the different Communication::Blocks composing the post
|
|
306
306
|
* @param {Array} category_ids (Optional) Array of strings representing the category or all the categories attached to this post. Empty Array by default
|
|
307
|
+
* @param {Date} crea_dt (Optional) Date of the post. Undefined by default
|
|
307
308
|
* @param {boolean} full_width (Optional) Indicates if the article should take all the theme width. False by default
|
|
308
309
|
* @param {string} summary (Optional) A short text that summerize the post. Empty string by default
|
|
309
310
|
* @returns Osuny's Communication::Post object.
|
|
310
311
|
*/
|
|
311
|
-
static createPost(title, migration_identifier, blocks, category_ids = [], full_width=false, summary=""){
|
|
312
|
+
static createPost(title, migration_identifier, blocks, category_ids = [], crea_dt=undefined, full_width=false, summary=""){
|
|
312
313
|
return {
|
|
313
314
|
"id": undefined,
|
|
314
315
|
"migration_identifier": migration_identifier,
|
|
@@ -322,11 +323,11 @@ export class OsunyUtility{
|
|
|
322
323
|
"featured_image": undefined,
|
|
323
324
|
"pinned": false,
|
|
324
325
|
"published": true,
|
|
325
|
-
"published_at":
|
|
326
|
+
"published_at": crea_dt,
|
|
326
327
|
"slug": this.slugify(title),
|
|
327
328
|
"summary": summary,
|
|
328
329
|
"blocks": blocks,
|
|
329
|
-
"created_at":
|
|
330
|
+
"created_at": crea_dt
|
|
330
331
|
}
|
|
331
332
|
}
|
|
332
333
|
|
package/package.json
CHANGED