Commit 18483d3
committed
fix(translate): return string translation stub instead of post payload
Replace the stub that returned the whole post object as "translated"
content (which Redis stored as the literal "[object Object]").
translate() is now async, returns [isEnglish, translatedText] with a
hardcoded string, and documents that the second value must stay a string
for correct hash storage.1 parent 96b8426 commit 18483d3
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
| |||
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
17 | | - | |
| 24 | + | |
0 commit comments