-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/initial commit #1
base: main
Are you sure you want to change the base?
Conversation
import { Injectable } from '@nestjs/common'; | ||
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter'; | ||
import { NextFunction, Request, Response } from 'express'; | ||
import fetch from 'node-fetch'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use "node-fetch", you can use the httpService instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attachmentService.uploadProfilePic requires a fetch.Response argument. We’ll either need to keep using fetch or modify the uploadProfilePic method to accommodate HttpService.
const axiosInstance = axios.create({ | ||
baseURL: 'https://slack.com/api', | ||
headers: { | ||
'Content-Type': 'application/json; charset=UTF-8', | ||
Authorization: `Bearer ${access_token}`, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we use the nestjs axios wrapper object instead ? I think you can create a child instance so that you define interceptors.
No description provided.