Send and receive SMS messages using your Android phone programmatically via a simple HTTP API
Fixing prettier
Acho Arnolda9bb859e41c3
diff --git a/web/layouts/default.vue b/web/layouts/default.vueindex 0c00a32e..0daffedb 100644--- a/web/layouts/default.vue+++ b/web/layouts/default.vue@@ -54,7 +54,7 @@ export default class DefaultLayout extends Vue {if (this.$store.getters.getAuthUser && this.$store.getters.getOwner) {promises.push(this.$store.dispatch('loadThreads'),- this.$store.dispatch('getHeartbeat'),+ this.$store.dispatch('getHeartbeat'))}@@ -66,8 +66,8 @@ export default class DefaultLayout extends Vue {promises.push(this.$store.dispatch('loadThreadMessages',- this.$store.getters.getThread.id,- ),+ this.$store.getters.getThread.id+ ))}await Promise.all(promises)diff --git a/web/pages/billing/index.vue b/web/pages/billing/index.vueindex 2fb83ac6..65c93ab6 100644--- a/web/pages/billing/index.vue+++ b/web/pages/billing/index.vue@@ -45,7 +45,7 @@Your next bill is for <b>${{ plan.price }}</b> on<b>{{new Date(- $store.getters.getUser.subscription_renews_at,+ $store.getters.getUser.subscription_renews_at).toLocaleDateString()}}</b></p>@@ -60,7 +60,7 @@You will be downgraded to the <b>FREE</b> plan on<b>{{new Date(- $store.getters.getUser.subscription_ends_at,+ $store.getters.getUser.subscription_ends_at).toLocaleDateString()}}</b></p>@@ -112,7 +112,7 @@of the current billing period on<b>{{new Date(- $store.getters.getUser.subscription_renews_at,+ $store.getters.getUser.subscription_renews_at).toLocaleDateString()}}</b></p>@@ -395,7 +395,7 @@ export default Vue.extend({plan(): PaymentPlan {return this.plans.find((x) =>- x.id === (this.$store.getters.getUser?.subscription_name || 'free'),+ x.id === (this.$store.getters.getUser?.subscription_name || 'free'))!},isOnFreePlan(): boolean {diff --git a/web/store/index.ts b/web/store/index.tsindex 25587f63..e7176359 100644--- a/web/store/index.ts+++ b/web/store/index.ts@@ -360,7 +360,7 @@ export const actions = {fcm_token: phone.fcm_token,phone_number: phone.phone_number,message_expiration_seconds: parseInt(- phone.message_expiration_seconds.toString(),+ phone.message_expiration_seconds.toString()),max_send_attempts: parseInt(phone.max_send_attempts.toString()),messages_per_minute: parseInt(phone.messages_per_minute.toString()),@@ -380,7 +380,7 @@ export const actions = {async handleAxiosError(context: ActionContext<State, State>,- error: AxiosError,+ error: AxiosError) {const errorMessage =error.response?.data?.data[Object.keys(error.response?.data?.data)[0]][0]@@ -415,7 +415,7 @@ export const actions = {async sendMessage(context: ActionContext<State, State>,- request: SendMessageRequest,+ request: SendMessageRequest) {try {const response = await axios.post('/v1/messages/send', request)@@ -443,7 +443,7 @@ export const actions = {addNotification(context: ActionContext<State, State>,- request: NotificationRequest,+ request: NotificationRequest) {context.commit('setNotification', request)},@@ -458,7 +458,7 @@ export const actions = {async loadThreadMessages(context: ActionContext<State, State>,- threadId: string | null,+ threadId: string | null) {await context.commit('setThreadId', threadId)const response = await axios.get('/v1/messages', {@@ -473,7 +473,7 @@ export const actions = {async setAuthUser(context: ActionContext<State, State>,- user: AuthUser | null | undefined,+ user: AuthUser | null | undefined) {const userChanged = user?.id !== context.getters.getAuthUser?.id@@ -490,7 +490,7 @@ export const actions = {])const phone = context.getters.getPhones.find(- (x: Phone) => x.id === context.getters.getUser.active_phone_id,+ (x: Phone) => x.id === context.getters.getUser.active_phone_id)if (phone) {await context.dispatch('setOwner', phone.phone_number)@@ -500,7 +500,7 @@ export const actions = {async onAuthStateChanged(context: ActionContext<State, State>,// @ts-ignore- { authUser },+ { authUser }) {if (authUser == null) {context.commit('setAuthUser', null)@@ -533,7 +533,7 @@ export const actions = {async updateThread(context: ActionContext<State, State>,- payload: { threadId: string; isArchived: boolean },+ payload: { threadId: string; isArchived: boolean }) {await axios.put(`/v1/message-threads/${payload.threadId}`, {is_archived: payload.isArchived,@@ -586,7 +586,7 @@ export const actions = {createWebhook(context: ActionContext<State, State>,- payload: RequestsWebhookStore,+ payload: RequestsWebhookStore) {return new Promise<EntitiesWebhook>((resolve, reject) => {axios@@ -634,7 +634,7 @@ export const actions = {updateWebhook(context: ActionContext<State, State>,- payload: RequestsWebhookUpdate & { id: string },+ payload: RequestsWebhookUpdate & { id: string }) {return new Promise<EntitiesWebhook>((resolve, reject) => {axios