export default function () {
  this.passthrough('https://api.airtable.com/**');
}

export function testConfig() {

  const AIRTABLE_ROOT = 'https://api.airtable.com/v0';
  const AIRTABLE_TABLE = 'appHAIFk9u1qqglhX';

  this.get(`${AIRTABLE_ROOT}/${AIRTABLE_TABLE}/Tests`, function (schema) {
    return schema.courseAirtables.all();
  });

  this.get(`${AIRTABLE_ROOT}/${AIRTABLE_TABLE}/Tests/:id`, function (schema, request) {
    return schema.courseAirtables.find(request.params.id);
  });

  this.get(`${AIRTABLE_ROOT}/${AIRTABLE_TABLE}/Epreuves/:id`, function (schema, request) {
    return schema.challengeAirtables.find(request.params.id);
  });

  this.get(`${AIRTABLE_ROOT}/${AIRTABLE_TABLE}/Evaluations/:id`, function (schema, request) {
    return schema.assessmentAirtables.find(request.params.id);
  });

  this.post(`${AIRTABLE_ROOT}/${AIRTABLE_TABLE}/Evaluations`, function (schema) {
    return schema.assessmentAirtables.all();
  });

}

@@ -180,20 +180,23 @@
 IRTABLE_
+DA
 TAB
-L
+AS
 E = 'app
@@ -245,36 +245,39 @@
 OOT%7D/$%7BAIRTABLE_
+DA
 TAB
-L
+AS
 E%7D/Tests%60, funct
@@ -379,20 +379,23 @@
 IRTABLE_
+DA
 TAB
-L
+AS
 E%7D/Tests
@@ -532,28 +532,31 @@
 /$%7BAIRTABLE_
+DA
 TAB
-L
+AS
 E%7D/Epreuves/
@@ -691,36 +691,39 @@
 OOT%7D/$%7BAIRTABLE_
+DA
 TAB
-L
+AS
 E%7D/Evaluations/:
@@ -867,20 +867,23 @@
 IRTABLE_
+DA
 TAB
-L
+AS
 E%7D/Evalu

rename AIRTABLE_TABLE to AIRTABLE_DATABASE