diff --git a/main.go b/main.go
index 059ab75..e4e4647 100644
--- a/main.go
+++ b/main.go
@@ -491,7 +491,7 @@ func Main(information library.ServiceInitializationInformation) *chi.Mux {
router.Get("/api/rfc/list", func(w http.ResponseWriter, r *http.Request) {
// Get the list of RFCs
- rows, err := conn.DB.Query("SELECT name, id, year, version FROM rfc")
+ rows, err := conn.DB.Query("SELECT name, id, year, version FROM rfc ORDER BY year DESC, id DESC")
if err != nil {
renderJSON(500, w, map[string]interface{}{"error": "Internal server error", "code": "01"}, information)
return
diff --git a/resources/templates/admin.html b/resources/templates/admin.html
index d7f2b3e..72e258d 100644
--- a/resources/templates/admin.html
+++ b/resources/templates/admin.html
@@ -14,6 +14,7 @@
+
Remove an RFC
@@ -26,6 +27,7 @@
const year = document.getElementById("rfcYear").value;
const id = document.getElementById("rfcId").value;
const text = document.getElementById("rfcText").value;
+ const version = document.getElementById("rfcVersion").value;
fetch("/api/rfc/add", {
method: "POST",
headers: {
@@ -35,7 +37,7 @@
name: title,
year: parseInt(year),
id: parseInt(id),
- version: "1.0.0",
+ version: version,
content: text,
token: localStorage.getItem("SECRET-token")
})
diff --git a/resources/templates/rfc.html b/resources/templates/rfc.html
index 9aaac12..6090683 100644
--- a/resources/templates/rfc.html
+++ b/resources/templates/rfc.html
@@ -25,6 +25,7 @@
height: 50px;
border: 1px solid black;
background-color: white;
+ margin-bottom: 5px;
}
#rfcList button:hover {