<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NafunaAfrica</title>
    <description>The latest articles on DEV Community by NafunaAfrica (@enqore).</description>
    <link>https://dev.to/enqore</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1026688%2F1e7f8792-2d83-4879-8eb7-19b039f2519f.png</url>
      <title>DEV Community: NafunaAfrica</title>
      <link>https://dev.to/enqore</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/enqore"/>
    <language>en</language>
    <item>
      <title>Why does strapi cms lose image links everytime I make changes and redeploy it to digitalocean?</title>
      <dc:creator>NafunaAfrica</dc:creator>
      <pubDate>Mon, 24 Apr 2023 11:10:36 +0000</pubDate>
      <link>https://dev.to/enqore/why-does-strapi-cms-lose-image-links-everytime-i-make-changes-and-redeploy-it-to-digitalocean-5020</link>
      <guid>https://dev.to/enqore/why-does-strapi-cms-lose-image-links-everytime-i-make-changes-and-redeploy-it-to-digitalocean-5020</guid>
      <description>&lt;p&gt;So I have made a strapi install locally. I managed to deploy it to digitalocean app platform. There I managed to set production env variables. Now I had forgot to create a slug and when I went back locally to add this and redeploy, all the blog articles had broken image links. Help!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Explain Sveltekit/Strapi API Like I'm Five</title>
      <dc:creator>NafunaAfrica</dc:creator>
      <pubDate>Mon, 17 Apr 2023 12:06:14 +0000</pubDate>
      <link>https://dev.to/enqore/explain-sveltekitstrapi-api-like-im-five-37e0</link>
      <guid>https://dev.to/enqore/explain-sveltekitstrapi-api-like-im-five-37e0</guid>
      <description>&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;I'm new and nice to meet you all! I have the following isse:&lt;/p&gt;

&lt;p&gt;So I have a web app built on Sveltekit. Here I intend to pull data from strapi for a blog as well as other information. I have made a route called news and a nested route called posts which is my API endpoint. Here in '/news/posts' I check with Postman and the demo data I have there flows in well:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IPjr-xX5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysef78at5g2838heeesx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IPjr-xX5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysef78at5g2838heeesx.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code that did that in the +server.ts files is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const GET = async ({ request }) =&amp;gt; {

const res = await fetch('https://cms.nafuna.tv/api/blogs')
const info = await res.json()

return new Response(JSON.stringify(info), { status: 200})

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;so now I wanted to get the data into the main +page.svelte file. I have made a +page.server.ts to load the data from the endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export async function load({ fetch }) { const res = await fetch('/news/posts') const info = await res.json() return { props: { blogs: info.data } }; }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My main issue happens when I am trying to use that in the +page.svelte whose code looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script lang="ts"&amp;gt;
import type { PageData } from './$types';

export let data;

&amp;lt;/script&amp;gt; {#each blogs as post}
{post.Title}
{/each}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the above won't display the posts coming from API. What am I missing? I'm pretty new to Sveltekit and have been learning Javascript for under 3 months so there maybe things that I know I missed. Here is a screenshot side by side so you can better see: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oCP9xtFV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6fwkj5xphc0ayefw4kw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oCP9xtFV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6fwkj5xphc0ayefw4kw.png" alt="Image description" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my first endpoint EVER. So I apologies for the Noob questions.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
