mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
Add register form, missing proper feedback on error or success
This commit is contained in:
@@ -7,7 +7,7 @@ import { SheetNames, saveLocalDb, loadLocalDb } from "./localDb"
|
||||
|
||||
export { SheetNames } from "./localDb"
|
||||
|
||||
// Test write attack with: wget --header='Content-Type:application/json' --post-data='{"prenom":"Pierre","nom":"SCELLES","email":"test@gmail.com","telephone":"0601010101","dejaBenevole":false,"commentaire":""}' http://localhost:3000/PreVolunteerAdd
|
||||
// Test write attack with: wget --header='Content-Type:application/json' --post-data='{"prenom":"Pierre","nom":"SCELLES","email":"test@gmail.com","telephone":"0601010101","dejaBenevole":false,"commentaire":""}' http://localhost:3000/PostulantAdd
|
||||
|
||||
const CRED_PATH = path.resolve(process.cwd(), "access/gsheets.json")
|
||||
|
||||
@@ -122,7 +122,7 @@ export class Sheet<
|
||||
return (_.max(ids) || 0) + 1
|
||||
}
|
||||
|
||||
async add(elementWithoutId: ElementNoId): Promise<Element> {
|
||||
async add(elementWithoutId: Omit<Element, "id">): Promise<Element> {
|
||||
const elements: Element[] = (await this.getList()) || []
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
const element: Element = { id: await this.nextId(), ...elementWithoutId } as Element
|
||||
|
Reference in New Issue
Block a user