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