From 357d1c0f0f4bb38f5d1e60a554a0835edd6e9aa5 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Tue, 12 Jan 2021 14:30:19 -0500 Subject: [PATCH] [+] Write api documents --- ProjectClock/Net.swift | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ProjectClock/Net.swift b/ProjectClock/Net.swift index bfa6b60..5571004 100644 --- a/ProjectClock/Net.swift +++ b/ProjectClock/Net.swift @@ -18,7 +18,29 @@ struct API /// Class to store static API endpoints class APIs { + /** + Register the user in the database. + + ## Parameters + - name: The user's name (this is not username because it doesn't have to be unique) + - email: The user's email (this does have to be unique) + - pass: Password (initial hash) + + ## Returns + Success or error + */ static let register = API(loc: "/user/register") + + /** + Delete a user from the database. + + ## Parameters + - email: The user's email + - pass: Password (initial hash) + + ## Returns + Success or error + */ static let delete = API(loc: "/user/delete") private init() {}