Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-strapi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit b7602474
authored
2024-07-09 15:32:58 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
d13d5fe0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
src/api/vendor/content-types/vendor/schema.json
src/api/vendor/controllers/vendor.js
src/api/vendor/routes/custom-routes.js
src/api/vendor/content-types/vendor/schema.json
View file @
b760247
...
...
@@ -66,14 +66,18 @@
"type"
:
"string"
},
"brandLogo"
:
{
"type"
:
"media"
,
"multiple"
:
false
,
"required"
:
false
,
"allowedTypes"
:
[
"images"
,
"files"
,
"videos"
,
"audios"
],
"type"
:
"media"
,
"multiple"
:
false
]
},
"uniqueVendorId"
:
{
"type"
:
"string"
}
}
}
src/api/vendor/controllers/vendor.js
View file @
b760247
...
...
@@ -227,6 +227,15 @@ module.exports = createCoreController("api::vendor.vendor", () => ({
main
().
catch
(
console
.
error
);
},
async
addVendorId
(
ctx
)
{
try
{
// console.log(ctx.request.body)
}
catch
(
error
)
{
}
},
async
removedirectory
(
ctx
)
{
// directory path
const
dir
=
`
${
__dirname
}
/../../../../../zango-frontend`
;
...
...
src/api/vendor/routes/custom-routes.js
View file @
b760247
...
...
@@ -34,6 +34,15 @@ const routes = {
}
},
{
method
:
"POST"
,
path
:
"/vendor/updateVendorId"
,
handler
:
"api::vendor.vendor.addVendorId"
,
config
:
{
// some configuration...
}
},
],
};
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment