File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,11 @@ type ContextResp struct {
14
14
GuildID string `json:"guild_id"`
15
15
GuildName string `json:"guild_name"`
16
16
CurrentContext bool
17
+ //TODO: *JWTToken
17
18
}
18
19
20
+ //TODO: Serialize future JWT token to server here, verifying ident w/ Oauth token
21
+
19
22
func NewContext (url string , guildid string ) * ContextResp {
20
23
// Create a request to the endpoint
21
24
req , err := http .NewRequest ("GET" , url + "/api/context" , nil )
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ func ContextHandler(w http.ResponseWriter, r *http.Request) {
60
60
guildID := r .Header .Get ("X-Discord-GuildId" )
61
61
guild , err := GetGuildInfo (GetSession (cfg ), guildID )
62
62
if err != nil {
63
- //If error contains 404, it means the guild was not found
64
63
if strings .Contains (err .Error (), "404" ) {
65
64
http .Error (w , "Guild not found" , http .StatusNotFound )
66
65
return
You can’t perform that action at this time.
0 commit comments