1
1
import { createCommand } from 'commander'
2
- import { ApiOptions , limit } from 'jike-sdk'
2
+ import { limit } from 'jike-sdk'
3
3
import { logger } from '@poppinss/cliui'
4
4
import { createClient , displayUser , filterUsers } from '../../utils/user'
5
5
import { displayImage , printIfRaw , renderDivider } from '../../utils/terminal'
@@ -13,7 +13,7 @@ interface ListOptions {
13
13
14
14
export const list = createCommand ( 'list' )
15
15
. alias ( 'ls' )
16
- . description ( 'feeds you are following ' )
16
+ . description ( 'view posts of user ' )
17
17
. argument ( '[username]' , 'the username of user' )
18
18
// TODO interactive next page, lastKey
19
19
. option ( '-c, --count <count>' , 'post max count' , '30' )
@@ -45,7 +45,7 @@ const listPosts = async (opts: ListOptions) => {
45
45
async function renderPost ( p : JikePostWithDetail ) {
46
46
const detail = p . getDetail ( )
47
47
const texts : string [ ] = [ ]
48
- if ( p . type === ApiOptions . PostType . ORIGINAL ) {
48
+ if ( detail . type === 'ORIGINAL_POST' ) {
49
49
const link = isMacOS
50
50
? logger . colors . gray (
51
51
logger . colors . underline ( `jike://page.jk/originalPost/${ p . id } ` )
0 commit comments