Skip to content

Commit

Permalink
fix: 성공 혹은 실패시 로그
Browse files Browse the repository at this point in the history
  • Loading branch information
not-using committed Dec 22, 2023
1 parent 4f7ba04 commit 501d569
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const handler = async (event) => {
const trigger = event?.rawPath?.slice(1) ?? 'meetings';
await Tasks[trigger](event);
} catch (error) {
console.log(error);
return {
statusCode: 500,
body: error.message,
Expand Down
1 change: 1 addition & 0 deletions src/services/meeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const sendMeetingConfirmation = async () => {
await Promise.all(
librarians.map((librarian) => sendBlocks(librarian, message))
);
console.log('meeting', librarians);
};

const getLibrariansFromSheet = async () => {
Expand Down
6 changes: 2 additions & 4 deletions src/services/shift.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { decemberRotation } from '../constants/decemberRotation.js';
import { SHIFT, SHIFT_WEEKEND } from '../constants/events.js';
import { TOGETHER_RANGE } from '../constants/sheet.js';
import { confirmMessage } from '../messages/confirmMessage.js';
import {
httpClientForSheet,
httpClientForTogether,
} from '../utils/httpClient.js';
import { httpClientForSheet } from '../utils/httpClient.js';
import { sendBlocks } from '../utils/slackChat.js';

const WEEKS = [1, 2, 3, 4, 5];
Expand All @@ -22,6 +19,7 @@ export const sendShiftConfirmation = async () => {
const todayLibrariansId = await getLibrariansIdFromSheet(todayLibrarians);

await Promise.all(todayLibrariansId.map((id) => sendBlocks(id, message)));
console.log('shift', todayLibrarians);
};

const getLibrariansIdFromSheet = async (targets) => {
Expand Down

0 comments on commit 501d569

Please sign in to comment.