Refactored the code some more

This commit is contained in:
phoenix
2025-10-22 22:54:25 -04:00
parent 3336efff95
commit b1352d56fe
4 changed files with 21 additions and 8 deletions
+10
View File
@@ -1,3 +1,13 @@
package config
import "fmt"
const PORT = 8080
const APP_NAME = "textsender-api"
func PortString() string {
portMessage := fmt.Sprintf(":%d", PORT)
return portMessage
}
+3 -1
View File
@@ -2,8 +2,10 @@ package handler
import "net/http"
import "git.kundeng.us/phoenix/textsender-api/internal/model"
func DraftMessageHandler(w http.ResponseWriter, r *http.Request) {
da := MessageItem{
da := model.MessageItem{
Id: 1,
Message: "The Word",
}
+6
View File
@@ -0,0 +1,6 @@
package model
type MessageItem struct {
Id int `json:"id"`
Message string `json:"message"`
}