Skip to content

Commit

Permalink
refactor: Remove unnecessary await
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Jul 30, 2024
1 parent 25fc2bf commit 1531b65
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/lib/patient/bookAppointment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async function bookAppointment(
transaction_id: string | null,
appointment_charge: string
) {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();
try {
const response = await fetch(`${serverUrl}/api/patient/appointment`, {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/patient/getPatientData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function getPatientData() {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/patient/getPatientMedicalHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function getPatientMedicalHistory() {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/patient/getPaymentsHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function getPaymentsHistory() {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/patient/getUpcomingAppointments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function getUpcomingAppointments() {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

try {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/patient/pendingAppointmentsReq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function pendingAppointmentsRequest(hospital_id: string) {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down
3 changes: 1 addition & 2 deletions app/lib/patient/saveAppointmentTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default async function saveAppointmentTransaction(
) {
const transactionData = {
transaction_id,
timestamp: new Date().toISOString(),
patient_id,
hospital_id,
disease,
Expand All @@ -22,7 +21,7 @@ export default async function saveAppointmentTransaction(
status,
};

const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/receptionist/approveAppointment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function approveAppointment(patientId: string) {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/receptionist/getPendingAppointments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSessionToken } from "../sessions/sessionUtils";
import getBaseUrl from "@utils/getBaseUrl";

export default async function getPendingAppointments() {
const session = await getSessionToken();
const session = getSessionToken();
const serverUrl = getBaseUrl();

const headers = {
Expand Down

0 comments on commit 1531b65

Please sign in to comment.