mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: switch from go to bun
This commit is contained in:
@@ -19,7 +19,7 @@ services:
|
||||
|
||||
- ./:/app/
|
||||
|
||||
- /home/nicolas/ironmount/tmp:/mounts:rshared
|
||||
# - /home/nicolas/ironmount/tmp:/mounts:rshared
|
||||
environment:
|
||||
- GO_ENV=development
|
||||
- VOLUME_ROOT=/home/nicolas/ironmount/tmp
|
||||
|
||||
@@ -74,7 +74,7 @@ func (v *VolumeService) CreateVolume(body VolumeCreateRequest) (*db.Volume, int,
|
||||
}
|
||||
stringConfig := string(bytesConfig)
|
||||
|
||||
if err := volumeQueries.InsertVolume(name, volPathHost, stringConfig); err != nil {
|
||||
if err := volumeQueries.InsertVolume(name, volPathHost, VolumeBackendTypeLocal, stringConfig); err != nil {
|
||||
if strings.Contains(err.Error(), "UNIQUE") {
|
||||
return nil, http.StatusConflict, fmt.Errorf("volume %s already exists", name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user