Type few anys
This commit is contained in:
+2
-2
@@ -43,7 +43,7 @@ class EventApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async createEvent(data: any): Promise<Event> {
|
||||
static async createEvent(data: Event): Promise<Event> {
|
||||
try {
|
||||
const resp = await axios.post(URL, data, {
|
||||
headers: {
|
||||
@@ -57,7 +57,7 @@ class EventApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async updateEvent(data: any): Promise<Event> {
|
||||
static async updateEvent(data: Event): Promise<Event> {
|
||||
try {
|
||||
const putUrl = `${URL}${data.id}/`;
|
||||
const resp = await axios.put(putUrl, data, {
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ class FeedApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async createPost(data): Promise<Post> {
|
||||
static async createPost(data: Post): Promise<Post> {
|
||||
try {
|
||||
const resp = await axios.post(URL, data, {
|
||||
headers: {
|
||||
@@ -47,7 +47,7 @@ class FeedApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async updatePost(data): Promise<Post> {
|
||||
static async updatePost(data: Post): Promise<Post> {
|
||||
try {
|
||||
const putUrl = `${URL}${data.id}/`;
|
||||
const resp = await axios.put(putUrl, data, {
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ class JobAdApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async createJobAd(data: any): Promise<JobAd> {
|
||||
static async createJobAd(data: JobAd): Promise<JobAd> {
|
||||
try {
|
||||
const resp = await axios.post(URL, data, {
|
||||
headers: {
|
||||
@@ -57,7 +57,7 @@ class JobAdApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async updateJobAd(data: any): Promise<JobAd> {
|
||||
static async updateJobAd(data: JobAd): Promise<JobAd> {
|
||||
try {
|
||||
const putUrl = `${URL}${data.id}/`;
|
||||
const resp = await axios.put(putUrl, data, {
|
||||
|
||||
@@ -105,7 +105,7 @@ class SignupApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async createForm(data): Promise<SignupForm> {
|
||||
static async createForm(data: SignupForm): Promise<SignupForm> {
|
||||
try {
|
||||
const resp = await axios.post(FORM_URL, data, {
|
||||
headers: {
|
||||
@@ -119,7 +119,7 @@ class SignupApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async updateForm(data): Promise<SignupForm> {
|
||||
static async updateForm(data: SignupForm): Promise<SignupForm> {
|
||||
try {
|
||||
const putUrl = `${FORM_URL}${data.id}/`;
|
||||
const resp = await axios.put(putUrl, data, {
|
||||
@@ -148,7 +148,7 @@ class SignupApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async signupFormSendEmail(data, id): Promise<any> {
|
||||
static async signupFormSendEmail(data: any, id: number): Promise<any> {
|
||||
try {
|
||||
const resp = await axios.post(`${FORM_URL}${id}/sendemail/`, data, {
|
||||
headers: {
|
||||
@@ -162,7 +162,7 @@ class SignupApi {
|
||||
}
|
||||
}
|
||||
|
||||
static async getSignups(id): Promise<Signup[]> {
|
||||
static async getSignups(id: number): Promise<Signup[]> {
|
||||
try {
|
||||
const resp = await axios.get(`${FORM_URL}${id}/signups/`, {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user