Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpitSureka committed Feb 4, 2024
1 parent 5506f51 commit 68817fe
Show file tree
Hide file tree
Showing 4 changed files with 3,409 additions and 103 deletions.
3 changes: 2 additions & 1 deletion admin_panel/admin-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const foodOutletResource = require("./resources/foodOutlet.resource");
const announcementResource = require("./resources/announcement.resource");
const buyItemResource = require("./resources/buyItem.resource");
const sellItemResource = require("./resources/sellItem.resource");
const homePageResource = require("./resources/homePage.resource");
AdminJs.registerAdapter(AdminJsMongoose);


Expand All @@ -35,7 +36,7 @@ var sessiontStore = new MongoDBStore(
});

const adminjs = new AdminJs({
resources: [announcementResource, messMenuResouce, foodOutletResource, adminResource, userResource, timingResource, contactsResource, cabSharingResource, lostItemResource, foundItemResource, buyItemResource, sellItemResource],
resources: [announcementResource, messMenuResouce, foodOutletResource, adminResource, userResource, timingResource, contactsResource, cabSharingResource, lostItemResource, foundItemResource, buyItemResource, sellItemResource, homePageResource],
assets: {
styles: styleAssets
},
Expand Down
7 changes: 2 additions & 5 deletions admin_panel/resources/homePage.resource.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
const verifyRoles = require("../utils");
const roles = require("../roles");
const homePage = require("../../models/homePage");
const AdminBro = require('admin-bro')
const AdminBroExpress = require('@admin-bro/express')
const uploadFeature = require('@admin-bro/upload')

let allowedRoles = [roles.SUPERADMIN, roles.LOST];
Expand All @@ -11,11 +8,11 @@ module.exports = {
resources: [{
resource: homePage,
features: [uploadFeature({
provider: { local: { bucket: 'images_folder/homePage' } },
provider: { local: { bucket: 'images_folder' } },
properties: {
key: 'fileUrl',
mimeType: 'mimeType',
filename: 'homeimage',
filename: 'homeimage1234567',
},
validation: {
mimeTypes: 'application/png'
Expand Down
Loading

0 comments on commit 68817fe

Please sign in to comment.