playing with datepicker options
This commit is contained in:
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
@ -46,26 +47,26 @@ func (a *App) GetAniListItem(aniId int, login bool) AniListGetSingleAnime {
|
||||
var neededVariables interface{}
|
||||
|
||||
if login {
|
||||
neededVariables = struct{
|
||||
MediaId int `json:"mediaId"`
|
||||
neededVariables = struct {
|
||||
MediaId int `json:"mediaId"`
|
||||
UserId int `json:"userId"`
|
||||
ListType string `json:"listType"`
|
||||
} {
|
||||
}{
|
||||
MediaId: aniId,
|
||||
UserId: user.Data.Viewer.ID,
|
||||
ListType: "ANIME",
|
||||
}
|
||||
} else {
|
||||
neededVariables = struct {
|
||||
MediaId int `json:"mediaId"`
|
||||
MediaId int `json:"mediaId"`
|
||||
ListType string `json:"listType"`
|
||||
} {
|
||||
}{
|
||||
MediaId: aniId,
|
||||
ListType: "ANIME",
|
||||
}
|
||||
}
|
||||
body := struct {
|
||||
Query string `json:"query"`
|
||||
Query string `json:"query"`
|
||||
Variables interface{} `json:"variables"`
|
||||
}{
|
||||
Query: `
|
||||
@ -135,7 +136,7 @@ func (a *App) GetAniListItem(aniId int, login bool) AniListGetSingleAnime {
|
||||
}
|
||||
|
||||
returnedBody, _ := AniListQuery(body, false)
|
||||
|
||||
|
||||
var post AniListGetSingleAnime
|
||||
err := json.Unmarshal(returnedBody, &post)
|
||||
if err != nil {
|
||||
@ -310,6 +311,8 @@ func (a *App) GetAniListUserWatchingList(page int, perPage int, sort string) Ani
|
||||
|
||||
returnedBody, _ := AniListQuery(body, true)
|
||||
|
||||
fmt.Println("ReturnedBody: ", string(returnedBody))
|
||||
|
||||
var post AniListCurrentUserWatchList
|
||||
err := json.Unmarshal(returnedBody, &post)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user