استخدام API مختلف في Nestjs (using another api with nestjs)

 


import axios from 'axios';
  async getHijriDate(hijri_date: string): Promise<any> {
    let sendUrl = `https://api.aladhan.com/v1/gToH/${hijri_date}`;
    const response = await axios.get(sendUrl);
    return response.data;
  }



//controller
  @Get('convert/:hijri_date')
  getHijriDate(@Param('hijri_date') hijri_date: string) {
    return this.smsMessagesService.getHijriDate(hijri_date);
  }


















تعليقات

المشاركات الشائعة من هذه المدونة

ngx-extended-pdf-viewer

how to getting access token for https://fcm.googleapis.com/v1/projects/al-ayahya-co/messages:send for angular and backend nestjs

طريقة تفعيل زر Inline Keyboard في Telegram Bot