File size: 671 Bytes
37decb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.cs102.attendance.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cs102.attendance.service.FastApiCallerService;

@RestController
public class FastApiCallerController {

    private final FastApiCallerService fastApiCallerService = new FastApiCallerService();

    @GetMapping("/call-face-recognition")
    public String callFaceRecognition() {
        try {
            return fastApiCallerService.callFaceRecognition();
        } catch (Exception e) {
            e.printStackTrace();
            return "Error calling face-recognition API";
        }
    }
}