yazid138 3 vuotta sitten
vanhempi
commit
d8e77641da
2 muutettua tiedostoa jossa 6 lisäystä ja 7 poistoa
  1. 5 6
      .env.example
  2. 1 1
      controller/log.controller.js

+ 5 - 6
.env.example

@@ -1,10 +1,9 @@
-BASE_URL=
-PORT=
+BASE_URL=http://localhost:5000
+PORT=5000
 SECRET=
 
 MONGO_URL=
-TOKEN=
+TOKEN_DEVELOPMENT=
+TOKEN_PRODUCTION=
 
-ROLE_DIKTI_ID=
-ROLE_LLDIKTI_ID=
-ROLE_PT_ID=
+ENV=local

+ 1 - 1
controller/log.controller.js

@@ -23,7 +23,7 @@ exports.create = handleError(async (req, res) => {
 })
 
 exports.all = handleError(async (req, res) => {
-  const log = await logModel.find().populate('user')
+  const log = await logModel.find().populate('user').sort({ createdAt: -1 })
 
   return response.success(res, {
     data: log,