Git Product home page Git Product logo

Comments (7)

oahehc avatar oahehc commented on July 2, 2024

GET /announcement/notifications
response 502

image

from camera-trap-api.

 avatar commented on July 2, 2024

目前 API 回傳格式與前端落差甚大
API response

   {
      "_id": "test_upload_session_02",
      "status": "ERROR",
      "modified": 1542706883.083,
      "created": 1541750624.016,
      "level": "WARNING",
      "message": "測試計畫1 臺東處-NULL<br/>TD03A 2018-01-01 00:00:00-2018-03-23 11:07:20",
      "collection": "UploadSession"
    },

而前端預設的格式是:

  {
    updateAt: '2018/07/23 17:25',
    project_id: '全島鼬獾',
    site: '屏東處',
    subSite: '潮州站',
    camera: 'PT09A',
    startAt: '2018/06/01',
    endAt: '2018/07/31',
    status: 1,
  },
  • API 端應取出對應的資料安排給前端,並提供必要資訊以組成 URL 形成連結

from camera-trap-api.

oahehc avatar oahehc commented on July 2, 2024

另外完成的部分, 希望各類型都能建一筆資料在測試帳號, 便於前端確認顯示格式, thanks

from camera-trap-api.

trashmai avatar trashmai commented on July 2, 2024

@oahehc 我補上欠缺的欄位了,欄位名稱稍微有點差異,startAt => earliestDataDate, endAt => latestDataDate。

from camera-trap-api.

oahehc avatar oahehc commented on July 2, 2024

@trashmai
上傳成功失敗可否協助各塞一筆資料

@cjk-halodule
請協助定義各種類型的通知顯示方式

[
  {
    "_id": "fa7cc29e-a97f-464d-b020-ae702c98536f",
    "reportId": "fa7cc29e-a97f-464d-b020-ae702c98536f",
    "reportType": "問題回報",
    "reportContentType": "篩選及下載",
    "description": "下載CSV沒有回應",
    "email": "[email protected]",
    "attachments": ["https://example.org/wait_forever.jpg"],
    "created": 1542793933.038,
    "modified": 1542793933.038,
    "message": "<[email protected]><br/>[問題回報][篩選及下載]<br/>下載CSV沒有回應",
    "status": "WARNING",
    "collection": "UserReport"
  },
  {
    "_id": "d31ec2d4-0267-4423-a81b-dda177a95962",
    "reportId": "d31ec2d4-0267-4423-a81b-dda177a95962",
    "reportType": "意見反饋",
    "reportContentType": "資料編輯",
    "description": "太神奇啦~~",
    "email": "[email protected]",
    "attachments": ["https://example.org/some_scratch.jpg"],
    "created": 1542785533.998,
    "modified": 1542785533.998,
    "message": "<[email protected]><br/>[意見反饋][資料編輯]<br/>太神奇啦~~",
    "status": "INFO",
    "collection": "UserReport"
  },
  {
    "_id": "test_upload_session_02",
    "status": "ERROR",
    "modified": 1542791508.528,
    "created": 1541750624.016,
    "level": "WARNING",
    "message": "測試計畫1 臺東處-NULL<br/>TD03A 2018-01-01 00:00:00-2018-03-23 11:07:20",
    "collection": "UploadSession"
  },
  {
    "_id": "test_upload_session",
    "status": "SUCCESS",
    "created": 1540788756.494,
    "modified": 1542791474.562,
    "level": "INFO",
    "message": "測試計畫1 新竹-南庄30林班<br/>HC21A 2017-01-26 09:35:27-2017-03-01 10:25:04",
    "collection": "UploadSession"
  },
  {
    "_id": "69d10deccf4b8f449204731df940ca57",
    "message": "(使用者) 回報相機異常:相機電量耗損過快<br/>測試計畫1 新竹-南庄30林班<br/>HC21A 2018/10/01-2018/11/16",
    "level": "WARNING",
    "modified": 1542563213.889,
    "created": 1542563213.889,
    "collection": "AbnormalData"
  },
  {
    "_id": "06fc82ba-2ea6-433e-9980-c5b9c7e04d44",
    "message": "系統今夜緊急維修,請暫停使用",
    "level": "WARNING",
    "created": 1541508803.35,
    "modified": 1541508803.35,
    "collection": "Announcement"
  },
  {
    "_id": "072529b2-1a90-4852-91e4-bc314ef426ca",
    "message": "系統建置中",
    "level": "INFO",
    "created": 1541508776.771,
    "modified": 1541508776.771,
    "collection": "Announcement"
  }
]

from camera-trap-api.

 avatar commented on July 2, 2024

這部分後端還需要調整輸出格式,我會看看如何做。

from camera-trap-api.

 avatar commented on July 2, 2024

Implemented in V1.

from camera-trap-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.