-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2510 from ever-co/stage
Release
- Loading branch information
Showing
49 changed files
with
714 additions
and
7,830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { IEmployee, INextParams, ITeamTask } from '@app/interfaces'; | ||
import { authenticatedGuard } from '@app/services/server/guards/authenticated-guard-app'; | ||
import { addTaskToDailyPlanRequest } from '@app/services/server/requests'; | ||
import { NextResponse } from 'next/server'; | ||
|
||
export async function PUT(req: Request, { params }: INextParams) { | ||
const res = new NextResponse(); | ||
|
||
const { planId } = params; | ||
if (!planId) { | ||
return; | ||
} | ||
|
||
const { $res, user, tenantId, organizationId, access_token } = await authenticatedGuard(req, res); | ||
if (!user) return $res('Unauthorized'); | ||
|
||
const body = (await req.json()) as unknown as { employeeId: IEmployee['id']; taskId: ITeamTask['id'] }; | ||
|
||
const response = await addTaskToDailyPlanRequest({ | ||
bearer_token: access_token, | ||
data: body, | ||
organizationId, | ||
planId, | ||
tenantId | ||
}); | ||
|
||
return $res(response.data); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.