Merge branch 'dev' into feature/blog
THAT WAS PAINFUL!
This commit is contained in:
commit
3e5ecb9372
99 changed files with 2029 additions and 1010 deletions
|
|
@ -3,7 +3,6 @@ package controller
|
|||
import (
|
||||
"arimelody-web/model"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
|
@ -32,7 +31,7 @@ func FetchThreadViewPost(actorID string, postID string) (*model.ThreadViewPost,
|
|||
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, errors.New(fmt.Sprintf("Failed to call Bluesky API: %v", err))
|
||||
return nil, fmt.Errorf("Failed to call Bluesky API: %v", err)
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
|
|
@ -41,7 +40,7 @@ func FetchThreadViewPost(actorID string, postID string) (*model.ThreadViewPost,
|
|||
data := Data{}
|
||||
err = json.NewDecoder(res.Body).Decode(&data)
|
||||
if err != nil {
|
||||
return nil, errors.New(fmt.Sprintf("Invalid response from server: %v", err))
|
||||
return nil, fmt.Errorf("Invalid response from server: %v", err)
|
||||
}
|
||||
|
||||
return &data.Thread, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue