Skip to content

Commit

Permalink
fix: add connection file
Browse files Browse the repository at this point in the history
  • Loading branch information
Paloma-Sanchez committed Nov 10, 2024
1 parent 332ff62 commit 2c0794f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/api/connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import axios from 'axios';

class Connect {
/** CONFIG **/

async initializeAccount(): Promise<void> {
await axios.put(`http://127.0.0.1:8000/v1/init/first-account`,
{
"username": "remi.bardon",
"password": "HsV>dFx^P[m!jM+4W9wf5k:_t{8pSQ*?",
"nickname": "Rémi B."
}
);
}

async setPodAddess(): Promise<void> {
await axios.put(`http://127.0.0.1:8000/v1/pod/config/address`),
{
"hostname": "crisp.chat"
}
}

async initializeServer(): Promise<void> {
await axios.put(`http://127.0.0.1:8000/v1/server/config`),
{
"domain": "crisp.chat"
}
}

async initializeServer(): Promise<void> {
await axios.put(`http://127.0.0.1:8000/v1/server/config`),
{
"domain": "crisp.chat"
}
}
}

export default new Connect;

0 comments on commit 2c0794f

Please sign in to comment.