Skip to content

Commit

Permalink
Merge pull request #76 from Styunlen/master
Browse files Browse the repository at this point in the history
Add login prompts
  • Loading branch information
luozhiya authored Jun 4, 2024
2 parents b890413 + a53bb18 commit 45fd484
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ require('cmp').setup({
| Command | Description |
|-------------------|--------------------------------------------------------------------|
| `Fitten register` | If you haven't registered yet, please run the command to register. |
| `Fitten login` | Try the command `Fitten login <user> <password>` to login. |
| `Fitten login` | Try the command `Fitten login` to login. |
| `Fitten logout` | Logout account |

### Action Commands
Expand Down
2 changes: 2 additions & 0 deletions lua/fittencode/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ M.api = {
---@param username string
---@param password string
login = function(username, password)
username = vim.fn.input('username ')
password = vim.fn.inputsecret('password ')
Sessions.login(username, password)
end,
logout = function()
Expand Down

0 comments on commit 45fd484

Please sign in to comment.