Skip to content

Commit

Permalink
uploading shirt fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
singharaj-usai committed Oct 16, 2024
1 parent a5db4c7 commit 35324e6
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/functions/api/models/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const assetSchema = new mongoose.Schema({
required: true,
},
creator: {
type: mongoose.Schema.Types.ObjectId,
type: Number,
ref: 'User',
required: true,
},
Expand Down
2 changes: 1 addition & 1 deletion server/functions/api/models/Shirt.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const shirtSchema = new mongoose.Schema({
required: true,
},
creator: {
type: mongoose.Schema.Types.ObjectId,
type: Number,
ref: 'User',
required: true,
},
Expand Down
4 changes: 2 additions & 2 deletions server/functions/api/routes/shirt.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ router.post(
const asset = new Asset({
assetId: assetId,
FileLocation: assetLocation,
creator: req.user._id,
creator: req.user.userId,
AssetType: 'Image',
Name: filter.clean(title),
Description: filter.clean(description),
Expand Down Expand Up @@ -252,7 +252,7 @@ router.post(
const shirt = new Asset({
assetId: shirtassetId,
FileLocation: shirtassetLocation,
creator: req.user._id,
creator: req.user.userId,
AssetType: 'Shirt',
Name: filter.clean(title),
Description: filter.clean(description),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35324e6

Please sign in to comment.