こんにちは。
- 「external_id」フィールドを使用してトピックを作成しました(REST API経由)。
- そのトピックを削除しました。トピックはデータベースに残りますが、ユーザーからは非表示になるはずです。
- 同じ「external_id」で同じトピックを作成しようとしましたが、「External has already been taken」というエラーが発生しました。
トピックがユーザーから削除された場合、ユーザーは同じデータで新しいトピックを作成できるはずですが、なぜそれができないのか、同じ「external_id」を使用する方法がないようです。これはバグのように思われます。
2022/10/12 12:33:32 resp: &{Status:404 Not Found StatusCode:404 Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Content-Type:[application/json; charset=utf-8] Date:[Wed, 12 Oct 2022 10:33:32 GMT] Referrer-Policy:[strict-origin-when-cross-origin] Server:[nginx] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Discourse-Route:[topics/show_by_external_id] X-Discourse-Username:[mohan43u] X-Download-Options:[noopen] X-Frame-Options:[SAMEORIGIN] X-Permitted-Cross-Domain-Policies:[none] X-Request-Id:[26b86048-937c-451c-ac0c-b23dbcd3c8ca] X-Runtime:[0.013603] X-Xss-Protection:[0]] Body:0xc000183bc0 ContentLength:-1 TransferEncoding:[] Close:false Uncompressed:true Trailer:map[] Request:0xc00030a800 TLS:0xc0000d22c0}
2022/10/12 12:33:32 req: &{Method:GET URL:https://forums.tamillinuxcommunity.org/t/external_id/7N69MKNwQAs.json Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Api-Key:[] Api-Username:[mohan43u]] Body:<nil> GetBody:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:forums.tamillinuxcommunity.org Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr: RequestURI: TLS:<nil> Cancel:<nil> Response:<nil> ctx:0xc0000260b8}
2022/10/12 12:33:32 {"errors":["The requested URL or resource could not be found."],"error_type":"not_found"}
2022/10/12 12:33:32 uploading https://www.youtube.com/watch?v=7N69MKNwQAs
2022/10/12 12:33:32 {"title":"[Youtube] ஆண்ட்ராய்டுக்கான கட்டற்ற மென்பொருள் | FOSS for Android | F-Droid | Tamil","raw":"https://www.youtube.com/watch?v=7N69MKNwQAs\nஇந்த காணொளியில் F-Droid எவ்வாறு பயன்படுத்துவது? அதன் பயன் என்ன ? - என்பதை காண்போம்.\n\nகாணொளி வழங்கியவர்: \nமணிமாறன், விழுப்புரம் கட்டற்ற மென்பொருள் குழுமம்\n\nF-Droid: http://fdroid.org/\n\n#fdroid #fossforandroid #tamil #android #vglug","category":3,"external_id":"7N69MKNwQAs"}
2022/10/12 12:33:33 failed to create Topic: https://www.youtube.com/watch?v=7N69MKNwQAs
2022/10/12 12:33:33 err: <nil>
2022/10/12 12:33:33 resp: &{Status:422 Unprocessable Entity StatusCode:422 Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Cache-Control:[no-cache, no-store] Content-Type:[application/json; charset=utf-8] Date:[Wed, 12 Oct 2022 10:33:33 GMT] Referrer-Policy:[strict-origin-when-cross-origin] Server:[nginx] X-Content-Type-Options:[nosniff] X-Discourse-Route:[posts/create] X-Discourse-Username:[mohan43u] X-Download-Options:[noopen] X-Frame-Options:[SAMEORIGIN] X-Permitted-Cross-Domain-Policies:[none] X-Request-Id:[217f7585-269a-48b3-ac5e-215e02e76bdb] X-Runtime:[0.060606] X-Xss-Protection:[0]] Body:{cs:0xc00032c180} ContentLength:-1 TransferEncoding:[] Close:false Uncompressed:false Trailer:map[] Request:0xc000352100 TLS:0xc0000d22c0}
2022/10/12 12:33:33 req: &{Method:POST URL:https://forums.tamillinuxcommunity.org/posts.json Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Api-Key:[] Api-Username:[mohan43u] Content-Type:[application/json]] Body:0xc0005b0228 GetBody:0x6b0e40 ContentLength:733 TransferEncoding:[] Close:false Host:forums.tamillinuxcommunity.org Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr: RequestURI: TLS:<nil> Cancel:<nil> Response:<nil> ctx:0xc0000260b8}
2022/10/12 12:33:33 {"action":"create_post","errors":["Title has already been used","External has already been taken"]}




