<https://github.com/Ptt-official-app/Ptt-backend/pull/280|#280 修正 post date 沒有被顯示>
*:clap: 解決掉的 issue / Resolved Issues* • close #259 *:pick: 變更內容 / Details of Changes* 修正 post_date 沒有被顯示
<https://github.com/Ptt-official-app/Ptt-backend/pull/280|#280 修正 post date 沒有被顯示>
*:clap: 解決掉的 issue / Resolved Issues* • close #259 *:pick: 變更內容 / Details of Changes* 修正 post_date 沒有被顯示
*發生了什麼事? / The Problem* 放入 Access Token 之後, POST /v1/users/{{自己的ID}}/drafts/0 (123 的 base64編碼) 應該要成功 但出現 panic 2021/08/24 15:18:00 http: panic serving [::1]:52275: runtime error: invalid memory address or nil pointer dereference goroutine 7 [running]: net/http.(*conn).serve.func1(0xc0001270e0) /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:1804 +0x153 panic(0x13427e0, 0x15fcda0) /usr/local/Cellar/go/1.16.6/libexec/src/runtime/panic.go:971 +0x499 <http://github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).updateUserDraft|github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).updateUserDraft>(0xc000060b80, 0x140f250, 0xc0002161c0, 0xc00021e500, 0xc0002002df, 0x4, 0xc0002002eb, 0x1) /Users/apple/golangProject/Ptt-backend/internal/delivery/http/route_users.go:452 +0x796 <http://github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).postUserDrafts(0xc000060b80|github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).postUserDrafts(0xc000060b80>, 0x140f250, 0xc0002161c0, 0xc00021e500, 0xc0002002df, 0x4, 0xc0002002eb, 0x1) /Users/apple/golangProject/Ptt-backend/internal/delivery/http/route_users.go:398 +0x17f <http://github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).postUsers(0xc000060b80|github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).postUsers(0xc000060b80>, 0x140f250, 0xc0002161c0, 0xc00021e500) /Users/apple/golangProject/Ptt-backend/internal/delivery/http/route_users.go:46 +0x276 <http://github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).routeUsers(0xc000060b80|github.com/Ptt-official-app/Ptt-backend/internal/delivery/http.(*Delivery).routeUsers(0xc000060b80>, 0x140f250, 0xc0002161c0, 0xc00021e500) /Users/apple/golangProject/Ptt-backend/internal/delivery/http/route.go:116 +0x476 net/http.HandlerFunc.ServeHTTP(0xc0001983a0, 0x140f250, 0xc0002161c0, 0xc00021e500) /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:2049 +0x44 net/http.(*ServeMux).ServeHTTP(0xc000028880, 0x140f250, 0xc0002161c0, 0xc00021e500) /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:2428 +0x1ad net/http.serverHandler.ServeHTTP(0xc00019a0e0, 0x140f250, 0xc0002161c0, 0xc00021e500) /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:2867 +0xa3 net/http.(*conn).serve(0xc0001270e0, 0x140f9a0, 0xc000028940) /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:1932 +0x8cd created by net/http.(*Server).Serve /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:2993 +0x39b *如何重現 / To Reproduce* curl --location --request POST '<http://localhost:8081/v1/users/test/drafts/0|http://localhost:8081/v1/users/test/drafts/0>' --header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Mjk4NzQ5NDAsInN1YiI6IlNZU09QIn0.sCR_jp6DM3DenO8F5fWHxNmnlJHi1C5qsrkLrIImzxyjoAvTnocnxxFXm_RWylvAcEuGMxP9rejcvvEaAK4h1A' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'action=update_draft' --data-urlencode 'raw=MTIz' *預期的行為 / Expected behavior* 成功新增草稿 *螢幕截圖 / Screenshots* <https://user-images.githubusercontent.com/10670845/130574024-f3752c8c-0241-4651-9d3f-9a1e11657553.png|截圖 2021-08-24 下午3 18 44> *備註* C2-7-6 跟 C2-7-7 可能是同樣問題,也許可以一起修正
<https://github.com/Ptt-official-app/Ptt-backend/pull/281|#281 修正 user draft 不能寫入的問題>
*:clap: 解決掉的 issue / Resolved Issues* • close #275 *:pick: 變更內容 / Details of Changes* 修正了寫入 user draft 會有問題
*發生了什麼事? / The Problem* 發生了 Server Error 但是 Server 卻沒有出現相關Log,懷疑錯誤處理被吃掉了。 *如何重現 / To Reproduce* 請參考 testing-script C6-1-2.sh 1. 取得可以在 test 版發文的 Access Token 2. 找到最新一篇文章的 filename 3. 用`curl -v <http://localhost:8081/v1/boards/test/articles/$NEW_FILENAME> -d 'action=append_comment' --data-urlencode 'type=推' --data-urlencode 'text=test push'` 發送新推文,接著就會看到錯誤了 *預期的行為 / Expected behavior* 應該要如文件回應被推文的文章內容 *螢幕截圖 / Screenshots* 伺服器端: <https://user-images.githubusercontent.com/600238/132132297-1ccbc866-b300-4929-a0da-86f6693f753e.png|截圖 2021-09-05 下午11 29 00> 客戶端: <https://user-images.githubusercontent.com/600238/132132326-6cd1e70a-bb7e-4d4c-ae16-9c3b09414eb1.png|截圖 2021-09-05 下午11 29 34> *開發環境 / Environment* Package version: cb8fb31f7a480dce1f29406be6c6d215d365c37e
Ptt 批踢踢實業坊
補充詳細一點 假如在C_Chat板直接搜尋「初音」 結果如下: ● 1 4 9/13 Allensert □ [閒聊] 為啥初音會被擋搜尋? 2 + 9/13 a125g □ [閒聊] 說到初音的神曲會想到哪首?
<https://github.com/Ptt-official-app/go-bbs/pull/113|#113 增加 boardID 以取得路徑>
*:clap: 解決掉的 issue / Resolved Issues* • close #112 *:pick: 變更內容 / Details of Changes* 增加 boardID 以取得推文文章路徑