alpha-version-dce-check-in-ui
Version:
UI for taking attendance and checking people in.
27 lines (20 loc) • 740 B
text/typescript
// Import types
import User from '../../../shared/types/User';
import VisitServerEndpoint from '../../../types/VisitServerEndpoint';
// Import constants
import STUDENT_PATH_PREFIX from '../../../shared/constants/STUDENT_PATH_PREFIX';
// Constants
const PATH = `${STUDENT_PATH_PREFIX}/attendance/students`
/**
* Given a course and event ID, fetch the corresponding roster.
* @author Benedikt Arnarsson
* @param courseId the ID of the course (Canvas generated)
* @returns a list of Users, containing ID and name information.
*/
const fetchStudentList = async (
courseId: number,
visitServerEndpoint: VisitServerEndpoint
): Promise<User[]> => {
return visitServerEndpoint({ path: PATH })
};
export default fetchStudentList;