isArchive and event of wall item modified
This commit is contained in:
@@ -60,12 +60,12 @@ export const setWallItems = async (
|
||||
);
|
||||
if (!LivingProject) return { status: "Project not found" };
|
||||
const findvalue = await wallItemModel(organization).findOne({
|
||||
modelUuid: modelUuid,
|
||||
modelUuid: modelUuid,isArchive:false
|
||||
});
|
||||
|
||||
if (findvalue) {
|
||||
const updatevalue = await wallItemModel(organization).findOneAndUpdate(
|
||||
{ modelUuid: modelUuid, projectId: projectId },
|
||||
{ modelUuid: modelUuid, projectId: projectId,isArchive:false },
|
||||
{
|
||||
modelName,
|
||||
position,
|
||||
@@ -96,7 +96,8 @@ export const setWallItems = async (
|
||||
});
|
||||
console.log("newValue: ", newValue);
|
||||
return {
|
||||
status: "wall Item created successfully",
|
||||
// status: "wall Item created successfully",
|
||||
status: "Success",
|
||||
data: newValue,
|
||||
};
|
||||
}
|
||||
@@ -124,7 +125,7 @@ export const getWallItems = async (data: IWallGet) => {
|
||||
);
|
||||
if (!LivingProject) return { status: "Project not found" };
|
||||
const findValue = await wallItemModel(organization).find({
|
||||
projectId: projectId,
|
||||
projectId: projectId,isArchive:false
|
||||
});
|
||||
if (!findValue) {
|
||||
return {
|
||||
@@ -165,7 +166,7 @@ export const deleteWallItems = async (
|
||||
const findValue = await wallItemModel(organization).findOneAndDelete({
|
||||
modelUuid: modelUuid,
|
||||
modelName: modelName,
|
||||
projectId: projectId,
|
||||
projectId: projectId,isArchive:false
|
||||
});
|
||||
if (!findValue) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user