Ptt-official-app / Ptt-backend

PTT APP 的後端
BSD 3-Clause "New" or "Revised" License
208 stars 68 forks source link

[BUG][後端測試表] 文章列表應該要正確解開 post_date #259

Closed PichuChen closed 3 years ago

PichuChen commented 3 years ago

發生了什麼事? / The Problem

目前文章列表的 post_date 一律都是空字串

參照 測試表 C2-5-3

如何重現 / To Reproduce

  1. 用 SYSOP 帳號登入後取得 Access Token
  2. 取得文章列表 curl http://localhost:8081/v1/users/SYSOP/articles -H "Authorization: bearer $ACCESS_TOKEN"

預期的行為 / Expected behavior

假如一篇文章他的發文日期是 二月三日,那應該要看到 " 2/03" 這樣的日期?

螢幕截圖 / Screenshots

截圖 2021-07-31 下午12 57 59

開發環境 / Environment

Ptt-backend: v0.0.5 (0371cfc5)

weizhe0422 commented 3 years ago

想請教一下,我看從go-bbs\pttbbsd內的ReadArticleRecordsFile拿到的是1/27,這邊只需要把這個值填回去就好嗎? 還是需要到年份呢? image

PichuChen commented 3 years ago

不用年份,基本上是有個欄位他大概有 6 bytes ,然後正常狀況下他會存發文的年月,沒辦法被使用者修改的。

不過有些版主會改他,然後改成特別的文字之類的。

要注意的是,回傳的開頭可能有空格,例如 1/23 這樣,那要回傳 1/23

weizhe0422 commented 3 years ago

了解,那我想從修正這個BUG開始。 再煩請Assign給我,感恩!

PichuChen commented 3 years ago

@weizhe0422 麻煩你了

PichuChen commented 3 years ago

@weizhe0422 想問一下目前有進度嗎?

weizhe0422 commented 3 years ago

我這週應該可以解決

PichuChen commented 3 years ago

@weizhe0422 想問一下目前進度到哪邊了?