mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 05:46:28 +02:00
Adds redux list add example
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
import * as _ from "lodash"
|
||||
import path from "path"
|
||||
import { promises as fs } from "fs"
|
||||
@@ -329,6 +330,20 @@ class Test {
|
||||
tictactoe: boolean[] = []
|
||||
}
|
||||
|
||||
// class Membre {
|
||||
// membreId = 0
|
||||
|
||||
// nom = ""
|
||||
|
||||
// prenom = ""
|
||||
|
||||
// mail = ""
|
||||
|
||||
// telephone = ""
|
||||
|
||||
// photo = ""
|
||||
// }
|
||||
|
||||
// Can't run it on every test, it requires private access to a google sheet
|
||||
async function testGSheetAPi(): Promise<void> {
|
||||
const dataset: Test[] = [
|
||||
@@ -368,6 +383,15 @@ async function testGSheetAPi(): Promise<void> {
|
||||
},
|
||||
]
|
||||
|
||||
// console.log("Lecture des Membres...")
|
||||
// const datasetMembresLu = await getList<Membre>("Membres", new Membre())
|
||||
// if (!datasetMembresLu) {
|
||||
// console.log("ECHEC de la lecture des membres", datasetMembresLu)
|
||||
// return
|
||||
// }
|
||||
// console.log("Extraction des membres réussie")
|
||||
// await fs.writeFile("membres.json", JSON.stringify(datasetMembresLu))
|
||||
|
||||
console.log("Test d'écriture...")
|
||||
const resultatEcriture = await setList<Test>("Tests de l'API", dataset)
|
||||
if (!resultatEcriture) {
|
||||
|
Reference in New Issue
Block a user