Skip to content

Commit c2c5950

Browse files
James TsaiJames Tsai
authored andcommitted
fix: fix accessToken variable name
1 parent 49bdaf1 commit c2c5950

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export HMD_API_ACCESS_TOKEN=MY_ACCESS_TOKEN
3838
Or in JSON file (`~/.hackmd/config.json`):
3939
```json
4040
{
41-
"accesstoken": "MY_ACCESS_TOKEN"
41+
"accessToken": "MY_ACCESS_TOKEN"
4242
}
4343
```
4444
### Set self-hosted API endpoint (optional)
@@ -67,7 +67,7 @@ All available configurations are listed in the table below.
6767
| Config key | Environment Variable | Data Type | Example Value | Description |
6868
| ------------ | :--------------------------------------------- | ----------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
6969
| `hackmdAPIEndpointURL` | `HMD_API_ENDPOINT_URL` | *`string`* | `https://my.hackmd-ee.api.endpoint` | The self-hosted API endpoint URL |
70-
| `accesstoken` | `HMD_API_ACCESS_TOKEN` | *`string`* | `MY_ACCESS_TOKEN` | Token to access HackMD APIs |
70+
| `accessToken` | `HMD_API_ACCESS_TOKEN` | *`string`* | `MY_ACCESS_TOKEN` | Token to access HackMD APIs |
7171
7272

7373
## Commands

src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import API from '@hackmd/api'
22

33
import config from './config'
44

5-
export const APIClient = new API(config.accesstoken as string, config.hackmdAPIEndpointURL)
5+
export const APIClient = new API(config.accessToken as string, config.hackmdAPIEndpointURL)

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const defaultConfig = {
1818

1919
const envConfig = {
2020
hackmdAPIEndpointURL: process.env.HMD_API_ENDPOINT_URL,
21-
accesstoken: process.env.HMD_API_ACCESS_TOKEN
21+
accessToken: process.env.HMD_API_ACCESS_TOKEN
2222
}
2323

2424
// look for a readable config file; we can merge it with the env.

0 commit comments

Comments
 (0)