Updated nucleus libs

Signed-off-by: arzumify <jliwin98@danwin1210.de>
This commit is contained in:
Tracker-Friendly 2025-01-11 15:42:55 +00:00
parent cff2e5b811
commit a65b7f6e0d
3 changed files with 7 additions and 3 deletions

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.23.3
require (
git.ailur.dev/ailur/fg-library/v3 v3.6.2
git.ailur.dev/ailur/fg-nucleus-library v1.1.2
git.ailur.dev/ailur/fg-nucleus-library v1.2.1
git.ailur.dev/ailur/pow v1.0.3
github.com/CAFxX/httpcompression v0.0.9
github.com/cespare/xxhash/v2 v2.3.0

3
go.sum
View File

@ -16,6 +16,9 @@ git.ailur.dev/ailur/fg-nucleus-library v1.1.1 h1:IRpAQqgikeT2FyhVbhe16GyIxuTsf1X
git.ailur.dev/ailur/fg-nucleus-library v1.1.1/go.mod h1:stxiTyMv3Fa7GzpyLbBUh3ahlb7110p0NnCl8ZTjwBs=
git.ailur.dev/ailur/fg-nucleus-library v1.1.2 h1:MXn0BorA8TV46Ig+4C96RU0NpFqrsGNbuw2QCc/7K6Q=
git.ailur.dev/ailur/fg-nucleus-library v1.1.2/go.mod h1:stxiTyMv3Fa7GzpyLbBUh3ahlb7110p0NnCl8ZTjwBs=
git.ailur.dev/ailur/fg-nucleus-library v1.2.0/go.mod h1:stxiTyMv3Fa7GzpyLbBUh3ahlb7110p0NnCl8ZTjwBs=
git.ailur.dev/ailur/fg-nucleus-library v1.2.1 h1:7Vs0q6KyIvAWDMkOvgOcbj/WKpubYKZUszhByKIF+/I=
git.ailur.dev/ailur/fg-nucleus-library v1.2.1/go.mod h1:stxiTyMv3Fa7GzpyLbBUh3ahlb7110p0NnCl8ZTjwBs=
git.ailur.dev/ailur/pow v1.0.3 h1:LjLSol4ax+M+SoajVjbBoDjfmjH6pKu3fDka7bl2KGY=
git.ailur.dev/ailur/pow v1.0.3/go.mod h1:ClAmIdHQ/N9wTq5S4YWhQ5d9CPUBcEjVuOkT07zBdJ4=
github.com/CAFxX/httpcompression v0.0.9 h1:0ue2X8dOLEpxTm8tt+OdHcgA+gbDge0OqFQWGKSqgrg=

View File

@ -3,6 +3,7 @@ package main
import (
library "git.ailur.dev/ailur/fg-library/v3"
nucleusLibrary "git.ailur.dev/ailur/fg-nucleus-library"
"io"
"bytes"
"os"
@ -193,7 +194,7 @@ func modifyFile(information *library.ServiceInitializationInformation, message l
if err != nil {
respondError(message, err, information, true)
}
if used+int64(len(message.Message.(nucleusLibrary.File).Bytes)) > quota {
if used+message.Message.(nucleusLibrary.File).Reader.N > quota {
respondError(message, errors.New("insufficient storage"), information, false)
return
}
@ -205,7 +206,7 @@ func modifyFile(information *library.ServiceInitializationInformation, message l
}
// Write the file
_, err = file.Write(message.Message.(nucleusLibrary.File).Bytes)
_, err = io.Copy(file, message.Message.(nucleusLibrary.File).Reader)
if err != nil {
respondError(message, err, information, true)
}