Updated nucleus libs
Signed-off-by: arzumify <jliwin98@danwin1210.de>
This commit is contained in:
parent
cff2e5b811
commit
a65b7f6e0d
2
go.mod
2
go.mod
|
@ -4,7 +4,7 @@ go 1.23.3
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.ailur.dev/ailur/fg-library/v3 v3.6.2
|
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
|
git.ailur.dev/ailur/pow v1.0.3
|
||||||
github.com/CAFxX/httpcompression v0.0.9
|
github.com/CAFxX/httpcompression v0.0.9
|
||||||
github.com/cespare/xxhash/v2 v2.3.0
|
github.com/cespare/xxhash/v2 v2.3.0
|
||||||
|
|
3
go.sum
3
go.sum
|
@ -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.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 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.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 h1:LjLSol4ax+M+SoajVjbBoDjfmjH6pKu3fDka7bl2KGY=
|
||||||
git.ailur.dev/ailur/pow v1.0.3/go.mod h1:ClAmIdHQ/N9wTq5S4YWhQ5d9CPUBcEjVuOkT07zBdJ4=
|
git.ailur.dev/ailur/pow v1.0.3/go.mod h1:ClAmIdHQ/N9wTq5S4YWhQ5d9CPUBcEjVuOkT07zBdJ4=
|
||||||
github.com/CAFxX/httpcompression v0.0.9 h1:0ue2X8dOLEpxTm8tt+OdHcgA+gbDge0OqFQWGKSqgrg=
|
github.com/CAFxX/httpcompression v0.0.9 h1:0ue2X8dOLEpxTm8tt+OdHcgA+gbDge0OqFQWGKSqgrg=
|
||||||
|
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
library "git.ailur.dev/ailur/fg-library/v3"
|
library "git.ailur.dev/ailur/fg-library/v3"
|
||||||
nucleusLibrary "git.ailur.dev/ailur/fg-nucleus-library"
|
nucleusLibrary "git.ailur.dev/ailur/fg-nucleus-library"
|
||||||
|
"io"
|
||||||
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"os"
|
"os"
|
||||||
|
@ -193,7 +194,7 @@ func modifyFile(information *library.ServiceInitializationInformation, message l
|
||||||
if err != nil {
|
if err != nil {
|
||||||
respondError(message, err, information, true)
|
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)
|
respondError(message, errors.New("insufficient storage"), information, false)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -205,7 +206,7 @@ func modifyFile(information *library.ServiceInitializationInformation, message l
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the file
|
// Write the file
|
||||||
_, err = file.Write(message.Message.(nucleusLibrary.File).Bytes)
|
_, err = io.Copy(file, message.Message.(nucleusLibrary.File).Reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
respondError(message, err, information, true)
|
respondError(message, err, information, true)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue