-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
124 created updated endpoint for infrastructure #188
124 created updated endpoint for infrastructure #188
Conversation
controller/infrastructure.js
Outdated
@@ -1,4 +1,5 @@ | |||
import { createInfrastructure } from "#services/infrastructure"; | |||
import infrastructure from "#models/infrastructure"; | |||
import { createInfrastructure, updateinfrastructure } from "#services/infrastructure"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateInfrastructure
controller/infrastructure.js
Outdated
name , type, wing, floor, capacity | ||
}= req.body; | ||
try{ | ||
const updateinfrastructure=await updateinfrastructure(filter,data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateInfrastructure
is a boolean
services/infrastructure.js
Outdated
export async function updateinfrastructure(filter,data){ | ||
const updateInfrastructure = await infrastructure.update({filter,data | ||
}); | ||
if(updateInfrastructure.name === name){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateInfrastructure
is boolean
Description
Briefly describe the changes made in this pull request.
Fixes
fixes: #124
Checklist