diff --git a/README.md b/README.md index 63eb19a..53c47b4 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ jobs:
![]() |
+
+ ![]() |
Why I Like Writing Technical Blogs
Requires me to delve further into the topic It forces me to learn more deeply about the...
@@ -75,7 +77,9 @@ jobs:
|
![]() |
+
+ ![]() |
Making Dynamic Website Thumbnail
Look at this article's thumbnail; it's generated dynamically when this post receives new reactions or...
@@ -83,7 +87,9 @@ jobs:
|
![]() |
+
+ ![]() |
[Survey] Automatic Table of Contents in Dev.to Articles
If you're an avid reader on Dev.to, you might have come across articles that feature a table of...
@@ -91,7 +97,9 @@ jobs:
|
![]() |
+
+ ![]() |
Is JWT Safe When Anyone Can Decode Plain Text Claims
If I get a JWT and can decode the payload, how is it secure? Why couldn't I just grab the token out...
@@ -99,7 +107,9 @@ jobs:
|
![]() |
+
+ ![]() |
Update your dev.to articles into your Github profile
In this article, I'll share you how to update your latest articles on dev.to into your Github...
@@ -117,4 +127,4 @@ jobs:
- [Is JWT Safe When Anyone Can Decode Plain Text Claims](https://dev.to/jacktt/is-jwt-safe-when-anyone-can-decode-plain-text-claims-3anc) - 15/09/2023
- [Update your dev.to articles into your Github profile](https://dev.to/jacktt/update-your-devto-articles-into-your-github-profile-4dpi) - 14/09/2023
-*Updated at: 2023-09-21T18:28:22Z*
\ No newline at end of file
+*Updated at: 2023-09-22T06:24:01+07:00*
\ No newline at end of file
diff --git a/impl/article_service/forem/service.go b/impl/article_service/forem/service.go
index b92b380..3ea2b32 100644
--- a/impl/article_service/forem/service.go
+++ b/impl/article_service/forem/service.go
@@ -2,6 +2,7 @@ package forem
import (
"context"
+ "fmt"
"github.com/huantt/article-listing/model"
"github.com/huantt/article-listing/pkg/forem"
)
@@ -36,6 +37,7 @@ func toModels(articles []forem.Article) []model.Article {
func toModel(article forem.Article) model.Article {
return model.Article{
+ Id: fmt.Sprintf("%d", article.Id),
Url: article.Url,
Title: article.Title,
Description: article.Description,
diff --git a/model/article.go b/model/article.go
index 4215412..e83cf6d 100644
--- a/model/article.go
+++ b/model/article.go
@@ -3,6 +3,7 @@ package model
import "time"
type Article struct {
+ Id string `json:"id"`
Url string `json:"url"`
Title string `json:"title"`
Description string `json:"description"`
|