tangled
alpha
login
or
join now
moth11.net
/
rvcx
3
fork
atom
backend for xcvr appview
3
fork
atom
overview
issues
4
pulls
pipelines
hm
moth11.net
5 months ago
a24c0d95
f1922196
+5
-3
1 changed file
expand all
collapse all
unified
split
server
internal
oauth
oauthclient.go
+5
-3
server/internal/oauth/oauthclient.go
···
202
202
body, _ := io.ReadAll(resp.Body)
203
203
return nil, fmt.Errorf("upload failed withy status %d: %s", resp.StatusCode, body)
204
204
}
205
205
-
var result lexutil.BlobSchema
205
205
+
var uploadResp struct {
206
206
+
Blob *lexutil.BlobSchema `json:"blob"`
207
207
+
}
206
208
decoder := json.NewDecoder(resp.Body)
207
207
-
err = decoder.Decode(&result)
209
209
+
err = decoder.Decode(&uploadResp)
208
210
if err != nil {
209
211
return nil, errors.New("failed to decode: " + err.Error())
210
212
}
211
211
-
return &result, nil
213
213
+
return uploadResp.Blob, nil
212
214
}
213
215
214
216
func CreateXCVRMedia(cs *oauth.ClientSession, imr *lex.MediaRecord, ctx context.Context) (uri string, cid string, err error) {