From c36066859b6f84880f0611c0aba4e8f721c2e23d Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 12 Mar 2021 10:07:21 +0100 Subject: [PATCH] fix: update script data + clean code --- scripts/ghost/migrations/init/posts.json | 4 +- scripts/ghost/migrations/init/tags.json | 299 +++++++++++++++++++++++ src/mailer/mailer.service.ts | 2 +- src/posts/posts.service.ts | 18 -- 4 files changed, 302 insertions(+), 21 deletions(-) diff --git a/scripts/ghost/migrations/init/posts.json b/scripts/ghost/migrations/init/posts.json index 1cadc680a..7d672a8ec 100644 --- a/scripts/ghost/migrations/init/posts.json +++ b/scripts/ghost/migrations/init/posts.json @@ -684,7 +684,7 @@ "codeinjection_foot": null, "custom_template": null, "canonical_url": null, - "tags": ["Infos", "Oullins"], + "tags": ["Infos", "oullins"], "authors": [ { "id": "5951f5fca366002ebd5dbef7", @@ -806,7 +806,7 @@ "codeinjection_foot": null, "custom_template": null, "canonical_url": null, - "tags": ["Ressources", "Oullins"], + "tags": ["Ressources", "oullins"], "authors": [ { "id": "5951f5fca366002ebd5dbef7", diff --git a/scripts/ghost/migrations/init/tags.json b/scripts/ghost/migrations/init/tags.json index 5a4ee0038..3bac468a5 100644 --- a/scripts/ghost/migrations/init/tags.json +++ b/scripts/ghost/migrations/init/tags.json @@ -23,6 +23,305 @@ "updated_at": "2021-02-26T14:52:32.000Z", "url": "http://localhost:2368/404/" }, + { + "id": "604a1780e9e2680001b90b2a", + "name": "Bron", + "slug": "bron", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a178de9e2680001b90b2c", + "name": "Brignais", + "slug": "brignais", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a17cde9e2680001b90b33", + "name": "Givors", + "slug": "givors", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a17dbe9e2680001b90b35", + "name": "Saint Priest", + "slug": "saint-priest", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a17e8e9e2680001b90b37", + "name": "Lyon 1er", + "slug": "lyon-1er", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a17f4e9e2680001b90b39", + "name": "Lyon 2eme", + "slug": "lyon-2eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a1801e9e2680001b90b3b", + "name": "Lyon 3eme", + "slug": "lyon-3eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a180ae9e2680001b90b3d", + "name": "Lyon 4eme", + "slug": "lyon-4eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a1814e9e2680001b90b3f", + "name": "Lyon 5eme", + "slug": "lyon-5eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a181ce9e2680001b90b41", + "name": "Lyon 6eme", + "slug": "lyon-6eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a1823e9e2680001b90b43", + "name": "Lyon 7eme", + "slug": "lyon-7eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a182be9e2680001b90b45", + "name": "Lyon 8eme", + "slug": "lyon-8eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, + { + "id": "604a1832e9e2680001b90b47", + "name": "Lyon 9eme", + "slug": "lyon-9eme", + "description": "commune", + "feature_image": null, + "visibility": "public", + "og_image": null, + "og_title": null, + "og_description": null, + "twitter_image": null, + "twitter_title": null, + "twitter_description": null, + "meta_title": null, + "meta_description": null, + "codeinjection_head": null, + "codeinjection_foot": null, + "canonical_url": null, + "accent_color": null, + "created_at": "2021-02-02T08:57:23.000Z", + "updated_at": "2021-02-26T14:52:32.000Z", + "url": "http://localhost:2368/404/" + }, { "id": "60390ae08cf07e0001358e5c", "name": "À la une", diff --git a/src/mailer/mailer.service.ts b/src/mailer/mailer.service.ts index 89deb5f8c..0650bc48c 100644 --- a/src/mailer/mailer.service.ts +++ b/src/mailer/mailer.service.ts @@ -93,7 +93,7 @@ export class MailerService { this.config.host }${ this.config.port ? ':' + this.config.port : '' - }/assets/logos/resin.jpg" alt="Logo resin" width="168" height="58"><br /><br /><p>Ce mail est un mail automatique. Merci de ne pas y répondre.</p>`; + }/assets/logos/resin.jpg" alt="Logo resin" width="168" height="58"><br /><br /><p>Ce mail est automatique. Merci de ne pas y répondre.</p>`; return html; } } diff --git a/src/posts/posts.service.ts b/src/posts/posts.service.ts index 4769e1f8a..498c69fed 100644 --- a/src/posts/posts.service.ts +++ b/src/posts/posts.service.ts @@ -28,24 +28,6 @@ export class PostsService { public getTags(): Promise<Tag[]> { return this.api.tags.browse({ limit: 'all' }); } - // public getTags(): Promise<Tag[]> { - // return new Promise((resolve) => { - // this.api.tags.browse({ limit: 'all' }).then((tags: Tag[]) => { - // tags.sort((x, y) => { - // if (x < y) { - // return -1; - // } - // if (x > y) { - // return 1; - // } - // return 0; - // }); - - // console.log(tags); - // resolve(tags); - // }); - // }); - // } /** * Get all locations tags. Ex: Oullins, Sainte-foy etc... -- GitLab