Add imports that I forgot to

This commit is contained in:
2vb 2023-12-26 20:19:56 -08:00
parent 0222b4fbcc
commit 04f2aab84f

View File

@ -3,6 +3,9 @@ package handlers
import ( import (
"crypto/sha1" "crypto/sha1"
"encoding/hex" "encoding/hex"
"io"
"os"
"strings"
"github.com/ectrc/snow/aid" "github.com/ectrc/snow/aid"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
@ -79,39 +82,39 @@ func GetCloudStorageFiles(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON([]aid.JSON{ return c.Status(fiber.StatusOK).JSON([]aid.JSON{
{ {
"uniqueFilename": "DefaultEngine.ini", "uniqueFilename": "DefaultEngine.ini",
"filename": "DefaultEngine.ini", "filename": "DefaultEngine.ini",
"hash": hex.EncodeToString(engineHash[:]), "hash": hex.EncodeToString(engineHash[:]),
"hash256": hex.EncodeToString(engineHash256[:]), "hash256": hex.EncodeToString(engineHash256[:]),
"length": len(TEMP_STORAGE["DefaultEngine.ini"]), "length": len(TEMP_STORAGE["DefaultEngine.ini"]),
"contentType": "application/octet-stream", "contentType": "application/octet-stream",
"uploaded": "2021-01-01T00:00:00.000Z", "uploaded": "2021-01-01T00:00:00.000Z",
"storageType": "S3", "storageType": "S3",
"doNotCache": false, "doNotCache": false,
"storageIds": []string{"primary"}, "storageIds": []string{"primary"},
}, },
{ {
"uniqueFilename": "DefaultGame.ini", "uniqueFilename": "DefaultGame.ini",
"filename": "DefaultGame.ini", "filename": "DefaultGame.ini",
"hash": hex.EncodeToString(gameHash[:]), "hash": hex.EncodeToString(gameHash[:]),
"hash256": hex.EncodeToString(gameHash256[:]), "hash256": hex.EncodeToString(gameHash256[:]),
"length": len(TEMP_STORAGE["DefaultGame.ini"]), "length": len(TEMP_STORAGE["DefaultGame.ini"]),
"contentType": "application/octet-stream", "contentType": "application/octet-stream",
"uploaded": "2021-01-01T00:00:00.000Z", "uploaded": "2021-01-01T00:00:00.000Z",
"storageType": "S3", "storageType": "S3",
"doNotCache": false, "doNotCache": false,
"storageIds": []string{"primary"}, "storageIds": []string{"primary"},
}, },
{ {
"uniqueFilename": "DefaultRuntimeOptions.ini", "uniqueFilename": "DefaultRuntimeOptions.ini",
"filename": "DefaultRuntimeOptions.ini", "filename": "DefaultRuntimeOptions.ini",
"hash": hex.EncodeToString(runtimeHash[:]), "hash": hex.EncodeToString(runtimeHash[:]),
"hash256": hex.EncodeToString(runtimeHash256[:]), "hash256": hex.EncodeToString(runtimeHash256[:]),
"length": len(TEMP_STORAGE["DefaultRuntimeOptions.ini"]), "length": len(TEMP_STORAGE["DefaultRuntimeOptions.ini"]),
"contentType": "application/octet-stream", "contentType": "application/octet-stream",
"uploaded": "2021-01-01T00:00:00.000Z", "uploaded": "2021-01-01T00:00:00.000Z",
"storageType": "S3", "storageType": "S3",
"doNotCache": false, "doNotCache": false,
"storageIds": []string{"primary"}, "storageIds": []string{"primary"},
}, },
}) })
} }
@ -119,13 +122,13 @@ func GetCloudStorageFiles(c *fiber.Ctx) error {
func GetCloudStorageConfig(c *fiber.Ctx) error { func GetCloudStorageConfig(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(aid.JSON{ return c.Status(fiber.StatusOK).JSON(aid.JSON{
"enumerateFilesPath": "/api/cloudstorage/system", "enumerateFilesPath": "/api/cloudstorage/system",
"enableMigration": true, "enableMigration": true,
"enableWrites": true, "enableWrites": true,
"epicAppName": "Live", "epicAppName": "Live",
"isAuthenticated": true, "isAuthenticated": true,
"disableV2": true, "disableV2": true,
"lastUpdated": "0000-00-00T00:00:00.000Z", "lastUpdated": "0000-00-00T00:00:00.000Z",
"transports": []string{}, "transports": []string{},
}) })
} }