Skip to content

Commit

Permalink
Merge pull request #93 from YosephSE/logs
Browse files Browse the repository at this point in the history
Logs
  • Loading branch information
YosephSE authored Sep 17, 2024
2 parents 865a17e + eeff60d commit f7bd03f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion client/components/admin/JobsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function DataTable() {
fetchJobs();
}, [dispatch]);

console.log(allJobs)
useEffect(() => {
if (allJobs) {
setLocalJobs(
Expand Down
1 change: 0 additions & 1 deletion client/redux/slices/AdminSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export const approve = createAsyncThunk(
async(id: string, { rejectWithValue }) => {
try{
const response = await axios.post(`${api}/admins/approve/${id}`)
console.log(response.data)
return response.data
} catch(error: any) {
return rejectWithValue(error.response?.data?.error || error.response.data.message)
Expand Down
2 changes: 0 additions & 2 deletions client/utils/imageUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ const uploadImage = async (file: any) => {
const storageRef = ref(storage, `images/${uniqueName}`);
const snapshot = await uploadBytes(storageRef, file);
const image = await getDownloadURL(snapshot.ref);
console.log("Image uploaded successfully");
console.log(image);
return image;
};

Expand Down
1 change: 0 additions & 1 deletion server/src/controllers/applications.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const createApplication = asyncHandler(
job: jobDetails,
candidate: candidateDetails,
};
console.log(toBeScored);
const score = await applicationScore(toBeScored);

const newApplication = {
Expand Down
3 changes: 1 addition & 2 deletions server/src/utils/applicationScore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const applicationScore = async (application: any): Promise<number> => {
require("dotenv").config();
const genAI = new GoogleGenerativeAI(process.env.API_KEY!);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });
console.log(application);

const prompt = `Please score the candidate's application out of 100 using your own criteria. Candidate Information: ${application.candidate} Job Criteria: ${application.job} Score the application based on the information provided above. Respond with only a number indicating the score. the format should be xx. For example, if you think the application deserves a score of 80, respond with 80.`;
const result = await model.generateContent(prompt);
Expand All @@ -13,7 +12,7 @@ const applicationScore = async (application: any): Promise<number> => {
return Number.isNaN(score) ? 0 : score;
} catch (error) {
console.error(error);
return Math.floor(Math.random() * 100);
return 0;
}
};

Expand Down

0 comments on commit f7bd03f

Please sign in to comment.