#141: Basic file options added
This commit is contained in:
@@ -19,7 +19,9 @@ SHUFFLE_DEFAULT_PASSWORD=
|
||||
SHUFFLE_DEFAULT_APIKEY=
|
||||
|
||||
# Local location of your app directory. Can't use ~/
|
||||
# Files will get better at some point. Right now: local saving.
|
||||
SHUFFLE_APP_HOTLOAD_LOCATION=./shuffle-apps
|
||||
SHUFFLE_FILE_LOCATION=./shuffle-files
|
||||
|
||||
# Other configs
|
||||
BACKEND_HOSTNAME=shuffle-backend
|
||||
|
||||
@@ -8,6 +8,7 @@ ADD ./go-app/main.go /app
|
||||
ADD ./go-app/walkoff.go /app
|
||||
ADD ./go-app/docker.go /app
|
||||
ADD ./go-app/codegen.go /app
|
||||
ADD ./go-app/files.go /app
|
||||
|
||||
ADD ./go-app/go.mod /app
|
||||
|
||||
|
||||
@@ -894,7 +894,6 @@ class AppBase:
|
||||
continue
|
||||
|
||||
new_headers = {
|
||||
"Content-Type": "multipart/form-data; charset=utf-8; boundary=\"test boundary Shuffle\"",
|
||||
"Authorization": "Bearer %s" % self.authorization,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
NAME=shuffle-app_sdk
|
||||
VERSION=0.8.0
|
||||
VERSION=0.8.1
|
||||
|
||||
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
|
||||
docker build . -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
|
||||
|
||||
+1
-23
@@ -2577,28 +2577,6 @@ func getSession(ctx context.Context, thissession string) (*session, error) {
|
||||
return curUser, nil
|
||||
}
|
||||
|
||||
// ListBooks returns a list of books, ordered by title.
|
||||
func getFile(ctx context.Context, id string) (*File, error) {
|
||||
key := datastore.NameKey("Files", id, nil)
|
||||
curFile := &File{}
|
||||
if err := dbclient.Get(ctx, key, curFile); err != nil {
|
||||
return &File{}, err
|
||||
}
|
||||
|
||||
return curFile, nil
|
||||
}
|
||||
|
||||
func setFile(ctx context.Context, file File) error {
|
||||
// clear session_token and API_token for user
|
||||
k := datastore.NameKey("Files", file.Id, nil)
|
||||
if _, err := dbclient.Put(ctx, k, &file); err != nil {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ListBooks returns a list of books, ordered by title.
|
||||
func getOrg(ctx context.Context, id string) (*Org, error) {
|
||||
key := datastore.NameKey("Organizations", id, nil)
|
||||
@@ -8067,10 +8045,10 @@ func initHandlers() {
|
||||
// https://developer.box.com/reference/get-files-id-content/
|
||||
// 1. Creating the "get file" option. Make it possible to run this in the frontend.
|
||||
r.HandleFunc("/api/v1/files/{fileId}/content", handleGetFileContent).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/api/v1/files/{fileId}", handleDeleteFile).Methods("DELETE", "OPTIONS")
|
||||
r.HandleFunc("/api/v1/files/create", handleCreateFile).Methods("POST", "OPTIONS")
|
||||
r.HandleFunc("/api/v1/files/{fileId}/upload", handleUploadFile).Methods("POST", "OPTIONS")
|
||||
//r.HandleFunc("/api/v1/files/{fileId}", handleGetFile).Methods("GET", "OPTIONS")
|
||||
//r.HandleFunc("/api/v1/files/{fileId}", handleGetFile).Methods("DELETE", "OPTIONS")
|
||||
|
||||
http.Handle("/", r)
|
||||
}
|
||||
|
||||
@@ -1830,7 +1830,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
for _, action := range workflow.Actions {
|
||||
allNodes = append(allNodes, action.ID)
|
||||
|
||||
if len(action.Errors) > 0 {
|
||||
if len(action.Errors) > 0 || !action.IsValid {
|
||||
action.IsValid = true
|
||||
action.Errors = []string{}
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,8 +1,8 @@
|
||||
version: '3'
|
||||
services:
|
||||
frontend:
|
||||
#build: ./frontend
|
||||
image: ghcr.io/frikky/shuffle-frontend:0.8.0
|
||||
build: ./frontend
|
||||
image: ghcr.io/frikky/shuffle-frontend:0.8.1
|
||||
container_name: shuffle-frontend
|
||||
hostname: shuffle-frontend
|
||||
ports:
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- backend
|
||||
backend:
|
||||
#build: ./backend
|
||||
image: ghcr.io/frikky/shuffle-backend:0.8.0
|
||||
image: ghcr.io/frikky/shuffle-backend:0.8.1
|
||||
container_name: shuffle-backend
|
||||
hostname: ${BACKEND_HOSTNAME}
|
||||
# Here for debugging:
|
||||
@@ -28,9 +28,11 @@ services:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps
|
||||
- ${SHUFFLE_FILE_LOCATION}:/shuffle-files
|
||||
environment:
|
||||
- DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
||||
- SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
|
||||
- SHUFFLE_FILE_LOCATION=/shuffle-files
|
||||
- ORG_ID=${ORG_ID}
|
||||
- SHUFFLE_APP_DOWNLOAD_LOCATION=${SHUFFLE_APP_DOWNLOAD_LOCATION}
|
||||
- SHUFFLE_DEFAULT_USERNAME=${SHUFFLE_DEFAULT_USERNAME}
|
||||
|
||||
Reference in New Issue
Block a user