mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
feat: go-chi and first routes setup
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package article
|
||||
|
||||
type Article struct {
|
||||
Id int
|
||||
Title string
|
||||
Body string
|
||||
createdAt string
|
||||
updatedAt string
|
||||
Id int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Body string `json:"body"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
func FromApi(
|
||||
@@ -29,7 +29,7 @@ func FromDb(
|
||||
Id: id,
|
||||
Title: title,
|
||||
Body: body,
|
||||
createdAt: createdAt,
|
||||
updatedAt: updatedAt,
|
||||
CreatedAt: createdAt,
|
||||
UpdatedAt: updatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ import (
|
||||
|
||||
type IArticleRepository interface {
|
||||
Get(id int) Article
|
||||
GetAll() []Article
|
||||
Create(article Article) Article
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user