Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
Easy Quest - Smart Recruitment Tool with AI - Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
22_23 - J 36
Easy Quest - Smart Recruitment Tool with AI - Backend
Commits
1bcc625c
Commit
1bcc625c
authored
May 10, 2023
by
H.M.C. Nadunithara Wijerathne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update organization profle
parent
faf2da78
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
NodeServer/src/config/types.ts
NodeServer/src/config/types.ts
+1
-1
NodeServer/src/routes/jobs.ts
NodeServer/src/routes/jobs.ts
+0
-4
NodeServer/src/routes/user.ts
NodeServer/src/routes/user.ts
+18
-1
No files found.
NodeServer/src/config/types.ts
View file @
1bcc625c
...
@@ -82,7 +82,7 @@ export type OrganizationType = {
...
@@ -82,7 +82,7 @@ export type OrganizationType = {
description
:
string
;
description
:
string
;
contacts
:
{
contacts
:
{
email
:
string
;
email
:
string
;
phone
:
string
[]
;
phone
:
string
;
address
:
AddressType
;
address
:
AddressType
;
website
:
string
;
website
:
string
;
};
};
...
...
NodeServer/src/routes/jobs.ts
View file @
1bcc625c
import
{
Router
}
from
"
express
"
;
import
{
Router
}
from
"
express
"
;
import
{
import
{
ApplicationType
,
JobType
,
JobType
,
TypedRequest
,
TypedRequest
,
USER_TYPE
,
USER_TYPE
,
}
from
"
../config/types
"
;
}
from
"
../config/types
"
;
import
{
import
{
authMiddleware
,
authMiddleware
,
candidateMiddleware
,
organizationMiddleware
,
organizationMiddleware
,
}
from
"
../middlewares/auth
"
;
}
from
"
../middlewares/auth
"
;
import
Application
from
"
../models/Application
"
;
import
Auth
from
"
../models/Auth
"
;
import
Auth
from
"
../models/Auth
"
;
import
Jobs
from
"
../models/Job
"
;
import
Jobs
from
"
../models/Job
"
;
import
ResumeAPI
from
"
../utilities/apis/resume
"
;
const
router
=
Router
();
const
router
=
Router
();
...
...
NodeServer/src/routes/user.ts
View file @
1bcc625c
import
{
Router
}
from
"
express
"
;
import
{
Router
}
from
"
express
"
;
import
{
CandidateType
,
TypedRequest
}
from
"
../config/types
"
;
import
{
CandidateType
,
OrganizationType
,
TypedRequest
}
from
"
../config/types
"
;
import
{
authMiddleware
}
from
"
../middlewares/auth
"
;
import
{
authMiddleware
}
from
"
../middlewares/auth
"
;
import
Candidates
from
"
../models/Candidate
"
;
import
Candidates
from
"
../models/Candidate
"
;
import
ResumeAPI
from
"
../utilities/apis/resume
"
;
import
ResumeAPI
from
"
../utilities/apis/resume
"
;
import
VoiceAPI
from
"
../utilities/apis/voice
"
;
import
VoiceAPI
from
"
../utilities/apis/voice
"
;
import
Organizations
from
"
../models/Organization
"
;
const
router
=
Router
();
const
router
=
Router
();
...
@@ -38,4 +39,20 @@ router.post(
...
@@ -38,4 +39,20 @@ router.post(
}
}
);
);
router
.
post
(
"
/organization
"
,
authMiddleware
,
async
(
req
:
TypedRequest
<
{
userId
:
string
},
OrganizationType
>
,
res
)
=>
{
try
{
const
update
=
req
.
body
;
await
Organizations
.
findByIdAndUpdate
(
req
.
query
.
userId
,
{
$set
:
update
});
return
res
.
status
(
200
).
json
({
data
:
req
.
body
});
}
catch
(
error
)
{
return
res
.
status
(
400
).
send
(
error
);
}
}
);
module
.
exports
=
router
;
module
.
exports
=
router
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment