-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from saibia8/workflow-reverted-formating
Workflow reverted formating
- Loading branch information
Showing
83 changed files
with
482 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export const apiBase = "https://whatver.com/api/posts"; | ||
export const url = new URL(apiBase); | ||
export const url = new URL(apiBase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from "./login.js"; | ||
export * from "./logout.js"; | ||
export * from "./register.js"; | ||
export * from "./state.js"; | ||
export * from "./login.js" | ||
export * from "./logout.js" | ||
export * from "./register.js" | ||
export * from "./state.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { apiPath } from "../constants.js"; | ||
import { headers } from "../headers.js"; | ||
import { save } from "../../storage/index.js"; | ||
import { save } from '../../storage/index.js' | ||
|
||
export async function login(email, password) { | ||
const response = await fetch(`${apiPath}/social/auth/login`, { | ||
method: "post", | ||
body: JSON.stringify({ email, password }), | ||
headers: headers("application/json"), | ||
}); | ||
headers: headers("application/json") | ||
}) | ||
|
||
if (response.ok) { | ||
const profile = await response.json(); | ||
save("token", profile.accessToken); | ||
delete profile.accessToken; | ||
save("profile", profile); | ||
return profile; | ||
const profile = await response.json() | ||
save("token", profile.accessToken) | ||
delete profile.accessToken | ||
save("profile", profile) | ||
return profile | ||
} | ||
|
||
throw new Error(response.statusText); | ||
} | ||
throw new Error(response.statusText) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { remove } from "../../storage/index.js"; | ||
|
||
export function logout() { | ||
remove("token"); | ||
remove("profile"); | ||
} | ||
remove("token") | ||
remove("profile") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export const apiUrl = new URL("https://nf-api.onrender.com/api/v1"); | ||
export const apiPath = apiUrl.toString(); | ||
export const apiPath = apiUrl.toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from "./auth/index.js"; | ||
export * from "./constants.js"; | ||
export * from "./posts/index.js"; | ||
export * from "./headers.js"; | ||
export * from "./auth/index.js" | ||
export * from "./constants.js" | ||
export * from "./posts/index.js" | ||
export * from "./headers.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export * from "./create.js"; | ||
export * from "./read.js"; | ||
export * from "./update.js"; | ||
export * from "./delete.js"; | ||
export * from "./react.js"; | ||
export * from "./comment.js"; | ||
export * from "./create.js" | ||
export * from "./read.js" | ||
export * from "./update.js" | ||
export * from "./delete.js" | ||
export * from "./react.js" | ||
export * from "./comment.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from "./read.js"; | ||
export * from "./update.js"; | ||
export * from "./delete.js"; | ||
export * from "./follow.js"; | ||
export * from "./unfollow.js"; | ||
export * from "./read.js" | ||
export * from "./update.js" | ||
export * from "./delete.js" | ||
export * from "./follow.js" | ||
export * from "./unfollow.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.