Skip to content

Commit af2e82f

Browse files
committed
fix: remove base64 encoding from workspace API
Signed-off-by: Donnie Adams <[email protected]>
1 parent e7e9231 commit af2e82f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/sdkserver/workspaces.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package sdkserver
22

33
import (
4-
"encoding/base64"
54
"encoding/json"
65
"fmt"
76
"net/http"
@@ -177,7 +176,7 @@ func (s *server) removeAllWithPrefixInWorkspace(w http.ResponseWriter, r *http.R
177176
type writeFileInWorkspaceRequest struct {
178177
workspaceCommonRequest `json:",inline"`
179178
FilePath string `json:"filePath"`
180-
Contents []byte `json:"contents"`
179+
Contents string `json:"contents"`
181180
}
182181

183182
func (s *server) writeFileInWorkspace(w http.ResponseWriter, r *http.Request) {
@@ -200,7 +199,7 @@ func (s *server) writeFileInWorkspace(w http.ResponseWriter, r *http.Request) {
200199
reqObject.Env,
201200
fmt.Sprintf(
202201
`{"workspace_id": "%s", "file_path": "%s", "body": "%s"}`,
203-
reqObject.ID, reqObject.FilePath, base64.StdEncoding.EncodeToString(reqObject.Contents),
202+
reqObject.ID, reqObject.FilePath, reqObject.Contents,
204203
),
205204
)
206205
if err != nil {

0 commit comments

Comments
 (0)