Updating references
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
JWT_SECRET=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
JWT_SECRET=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
||||||
DB_MAIN_NAME=textsender_db
|
DB_MAIN_NAME=schedtxt_db
|
||||||
DB_MAIN_USER=textsender
|
DB_MAIN_USER=schedtxt
|
||||||
DB_MAIN_PASSWORD=password
|
DB_MAIN_PASSWORD=password
|
||||||
DB_MAIN_HOST=main_db
|
DB_MAIN_HOST=main_db
|
||||||
DB_MAIN_PORT=5432
|
DB_MAIN_PORT=5432
|
||||||
@@ -10,5 +10,5 @@ TWILIO_AUTH_SID=9M438C93R943U4329MCU43C34U
|
|||||||
TWILIO_SERVICE_SID=9M4J3X8439U398NUVT3342MC349C348T
|
TWILIO_SERVICE_SID=9M4J3X8439U398NUVT3342MC349C348T
|
||||||
TWILIO_AUTH_TOKEN="MA08HJp9tYtkfs72m8JIIROofRVm74oR0ixEYBHGYpB9"
|
TWILIO_AUTH_TOKEN="MA08HJp9tYtkfs72m8JIIROofRVm74oR0ixEYBHGYpB9"
|
||||||
TWILIO_PHONE_NUMBER=+10123456789
|
TWILIO_PHONE_NUMBER=+10123456789
|
||||||
ALLOWED_ORIGINS="http://textsender.com,http://localhost:5173,http://localhost:9080,http://localhost:9081"
|
ALLOWED_ORIGINS="http://schedtxt.com,http://localhost:5173,http://localhost:9080,http://localhost:9081"
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
JWT_SECRET=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
JWT_SECRET=NULqYIzgt28bTiyziCd7IOO7b6LnWDW!
|
||||||
DB_MAIN_NAME=textsender_db
|
DB_MAIN_NAME=schedtxt_db
|
||||||
DB_MAIN_USER=textsender
|
DB_MAIN_USER=schedtxt
|
||||||
DB_MAIN_PASSWORD=password
|
DB_MAIN_PASSWORD=password
|
||||||
DB_MAIN_HOST=localhost
|
DB_MAIN_HOST=localhost
|
||||||
DB_MAIN_PORT=5432
|
DB_MAIN_PORT=5432
|
||||||
@@ -10,5 +10,5 @@ TWILIO_AUTH_SID=9M438C93R943U4329MCU43C34U
|
|||||||
TWILIO_SERVICE_SID=9M4J3X8439U398NUVT3342MC349C348T
|
TWILIO_SERVICE_SID=9M4J3X8439U398NUVT3342MC349C348T
|
||||||
TWILIO_AUTH_TOKEN="MA08HJp9tYtkfs72m8JIIROofRVm74oR0ixEYBHGYpB9"
|
TWILIO_AUTH_TOKEN="MA08HJp9tYtkfs72m8JIIROofRVm74oR0ixEYBHGYpB9"
|
||||||
TWILIO_PHONE_NUMBER=+10123456789
|
TWILIO_PHONE_NUMBER=+10123456789
|
||||||
ALLOWED_ORIGINS="http://textsender.com,http://localhost:5173,http://localhost:9080,http://localhost:9081"
|
ALLOWED_ORIGINS="http://schedtxt.com,http://localhost:5173,http://localhost:9080,http://localhost:9081"
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
|
|||||||
+10
-10
@@ -1,4 +1,4 @@
|
|||||||
name: textsender_api PR
|
name: schedtxt_api PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -21,12 +21,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo check
|
cargo check
|
||||||
|
|
||||||
@@ -42,12 +42,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
@@ -62,10 +62,10 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo clippy -- -D warnings
|
cargo clippy -- -D warnings
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: textsender_api Test
|
name: schedtxt_api Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -61,12 +61,12 @@ jobs:
|
|||||||
ENABLE_REGISTRATION: 'TRUE'
|
ENABLE_REGISTRATION: 'TRUE'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
@@ -82,10 +82,10 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: textsender_api Build
|
name: schedtxt_api Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -22,12 +22,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo check
|
cargo check
|
||||||
|
|
||||||
@@ -81,12 +81,12 @@ jobs:
|
|||||||
ENABLE_REGISTRATION: 'TRUE'
|
ENABLE_REGISTRATION: 'TRUE'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
|
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
@@ -102,12 +102,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
@@ -122,12 +122,12 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo clippy -- -D warnings
|
cargo clippy -- -D warnings
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@@ -141,10 +141,10 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender-models_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/schedtxt-models_deploy_key
|
||||||
chmod 600 ~/.ssh/textsender-models_deploy_key
|
chmod 600 ~/.ssh/schedtxt-models_deploy_key
|
||||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/textsender-models_deploy_key
|
ssh-add -v ~/.ssh/schedtxt-models_deploy_key
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|||||||
Generated
+24
-24
@@ -2230,6 +2230,30 @@ dependencies = [
|
|||||||
"windows-sys 0.61.2",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "schedtxt_api"
|
||||||
|
version = "0.2.4"
|
||||||
|
dependencies = [
|
||||||
|
"axum",
|
||||||
|
"axum-extra",
|
||||||
|
"josekit",
|
||||||
|
"jsonwebtoken",
|
||||||
|
"schedtxt_models",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sqlx",
|
||||||
|
"swoosh",
|
||||||
|
"time",
|
||||||
|
"tokio",
|
||||||
|
"tower",
|
||||||
|
"tower-http 0.7.0",
|
||||||
|
"tracing-subscriber",
|
||||||
|
"url",
|
||||||
|
"utoipa",
|
||||||
|
"utoipa-swagger-ui",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "schedtxt_models"
|
name = "schedtxt_models"
|
||||||
version = "0.5.3"
|
version = "0.5.3"
|
||||||
@@ -2789,30 +2813,6 @@ dependencies = [
|
|||||||
"windows-sys 0.61.2",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "textsender_api"
|
|
||||||
version = "0.2.4"
|
|
||||||
dependencies = [
|
|
||||||
"axum",
|
|
||||||
"axum-extra",
|
|
||||||
"josekit",
|
|
||||||
"jsonwebtoken",
|
|
||||||
"schedtxt_models",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sqlx",
|
|
||||||
"swoosh",
|
|
||||||
"time",
|
|
||||||
"tokio",
|
|
||||||
"tower",
|
|
||||||
"tower-http 0.7.0",
|
|
||||||
"tracing-subscriber",
|
|
||||||
"url",
|
|
||||||
"utoipa",
|
|
||||||
"utoipa-swagger-ui",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "2.0.18"
|
version = "2.0.18"
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "textsender_api"
|
name = "schedtxt_api"
|
||||||
version = "0.2.4"
|
version = "0.2.4"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.97"
|
rust-version = "1.97"
|
||||||
|
|||||||
+3
-3
@@ -21,7 +21,7 @@ COPY Cargo.toml Cargo.lock ./
|
|||||||
RUN --mount=type=ssh mkdir src && \
|
RUN --mount=type=ssh mkdir src && \
|
||||||
echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \
|
echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \
|
||||||
cargo build --release --quiet && \
|
cargo build --release --quiet && \
|
||||||
rm -rf src target/release/deps/textsender_api*
|
rm -rf src target/release/deps/schedtxt_api*
|
||||||
|
|
||||||
# Copy the actual source code
|
# Copy the actual source code
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
@@ -39,7 +39,7 @@ RUN apt-get update && apt-get install -y ca-certificates libssl-dev libssl3 && r
|
|||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR /usr/local/bin
|
WORKDIR /usr/local/bin
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app/target/release/textsender_api .
|
COPY --from=builder /usr/src/app/target/release/schedtxt_api .
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app/.env .
|
COPY --from=builder /usr/src/app/.env .
|
||||||
COPY --from=builder /usr/src/app/migrations ./migrations
|
COPY --from=builder /usr/src/app/migrations ./migrations
|
||||||
@@ -47,4 +47,4 @@ COPY --from=builder /usr/src/app/migrations ./migrations
|
|||||||
EXPOSE 9081
|
EXPOSE 9081
|
||||||
|
|
||||||
# Set the command to run your application
|
# Set the command to run your application
|
||||||
CMD ["./textsender_api"]
|
CMD ["./schedtxt_api"]
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
# Getting started
|
# Getting started
|
||||||
Fastest way to get started is with docker. Make sure that is installed before moving forward.
|
Fastest way to get started is with docker. Make sure that is installed before moving forward.
|
||||||
|
|
||||||
This application requires `textsender_auth` and `catapult` repositories to be located in the
|
This application requires `schedtxt_auth` and `catapult` repositories to be located in the
|
||||||
parent directory.
|
parent directory.
|
||||||
|
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
..
|
..
|
||||||
- textsender_auth/
|
- schedtxt_auth/
|
||||||
- textsender_api/
|
- schedtxt_api/
|
||||||
- catapult/
|
- catapult/
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ Copy over the `.env.docker.sample` to `.env` to get started.
|
|||||||
|
|
||||||
### Token service
|
### Token service
|
||||||
The `JWT_SECRET` environment variable should be the same variable as `SECRET_MAIN_KEY` in
|
The `JWT_SECRET` environment variable should be the same variable as `SECRET_MAIN_KEY` in
|
||||||
`textsender_auth`.
|
`schedtxt_auth`.
|
||||||
|
|
||||||
### Messaging configuration
|
### Messaging configuration
|
||||||
textsender uses `twilio` as the service to send the messages. You will need to sign up with
|
schedtxt uses `twilio` as the service to send the messages. You will need to sign up with
|
||||||
them and be provided an account SID, service SID, auth token, and phone number. Update the
|
them and be provided an account SID, service SID, auth token, and phone number. Update the
|
||||||
corresponding `TWILIO_*` variables.
|
corresponding `TWILIO_*` variables.
|
||||||
|
|
||||||
|
|||||||
+16
-16
@@ -6,7 +6,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
ssh: ["default"]
|
ssh: ["default"]
|
||||||
container_name: textsender_api
|
container_name: schedtxt_api
|
||||||
ports:
|
ports:
|
||||||
- "9081:9081"
|
- "9081:9081"
|
||||||
env_file:
|
env_file:
|
||||||
@@ -15,13 +15,13 @@ services:
|
|||||||
main_db:
|
main_db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- textsender_api-network
|
- schedtxt_api-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# --- Auth API ---
|
# --- Auth API ---
|
||||||
auth_api:
|
auth_api:
|
||||||
build:
|
build:
|
||||||
context: ../textsender_auth
|
context: ../schedtxt_auth
|
||||||
ssh: ["default"]
|
ssh: ["default"]
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: auth_api
|
container_name: auth_api
|
||||||
@@ -29,12 +29,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "9080:9080"
|
- "9080:9080"
|
||||||
env_file:
|
env_file:
|
||||||
- ../textsender_auth/.env
|
- ../schedtxt_auth/.env
|
||||||
depends_on:
|
depends_on:
|
||||||
auth_db:
|
auth_db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- textsender_api-network
|
- schedtxt_api-network
|
||||||
|
|
||||||
# --- catapult service ---
|
# --- catapult service ---
|
||||||
catapult:
|
catapult:
|
||||||
@@ -52,18 +52,18 @@ services:
|
|||||||
- auth_api
|
- auth_api
|
||||||
- auth_db
|
- auth_db
|
||||||
networks:
|
networks:
|
||||||
- textsender_api-network
|
- schedtxt_api-network
|
||||||
|
|
||||||
|
|
||||||
# PostgreSQL Database Service
|
# PostgreSQL Database Service
|
||||||
main_db:
|
main_db:
|
||||||
image: postgres:18.4-alpine
|
image: postgres:18.4-alpine
|
||||||
container_name: textsender_api_db
|
container_name: schedtxt_api_db
|
||||||
environment:
|
environment:
|
||||||
# These MUST match the user, password, and database name in the DATABASE_URL above
|
# These MUST match the user, password, and database name in the DATABASE_URL above
|
||||||
POSTGRES_USER: ${DB_MAIN_USER:-textsender_api}
|
POSTGRES_USER: ${DB_MAIN_USER:-schedtxt_api}
|
||||||
POSTGRES_PASSWORD: ${DB_MAIN_PASSWORD:-password}
|
POSTGRES_PASSWORD: ${DB_MAIN_PASSWORD:-password}
|
||||||
POSTGRES_DB: ${DB_MAIN_NAME:-textsender_api_db}
|
POSTGRES_DB: ${DB_MAIN_NAME:-schedtxt_api_db}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql
|
- postgres_data:/var/lib/postgresql
|
||||||
ports:
|
ports:
|
||||||
@@ -77,17 +77,17 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- textsender_api-network
|
- schedtxt_api-network
|
||||||
|
|
||||||
# --- textsender_api web auth api db ---
|
# --- schedtxt_api web auth api db ---
|
||||||
auth_db:
|
auth_db:
|
||||||
image: postgres:18.4-alpine
|
image: postgres:18.4-alpine
|
||||||
container_name: textsender_api_auth_db
|
container_name: schedtxt_api_auth_db
|
||||||
environment:
|
environment:
|
||||||
# These MUST match the user, password, and database name in the DATABASE_URL above
|
# These MUST match the user, password, and database name in the DATABASE_URL above
|
||||||
POSTGRES_USER: ${DB_AUTH_USER:-textsender_auth}
|
POSTGRES_USER: ${DB_AUTH_USER:-schedtxt_auth}
|
||||||
POSTGRES_PASSWORD: ${DB_AUTH_PASSWORD:-password}
|
POSTGRES_PASSWORD: ${DB_AUTH_PASSWORD:-password}
|
||||||
POSTGRES_DB: ${DB_AUTH_NAME:-textsender_auth_db}
|
POSTGRES_DB: ${DB_AUTH_NAME:-schedtxt_auth_db}
|
||||||
volumes:
|
volumes:
|
||||||
# Persist database data using a named volume
|
# Persist database data using a named volume
|
||||||
- postgres_data_auth:/var/lib/postgresql
|
- postgres_data_auth:/var/lib/postgresql
|
||||||
@@ -102,7 +102,7 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- textsender_api-network
|
- schedtxt_api-network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
@@ -111,5 +111,5 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
textsender_api-network:
|
schedtxt_api-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ pub async fn auth<B>(
|
|||||||
let secret_key = schedtxt_models::envy::environment::get_secret_main_key().value;
|
let secret_key = schedtxt_models::envy::environment::get_secret_main_key().value;
|
||||||
|
|
||||||
let mut validation = Validation::new(jsonwebtoken::Algorithm::HS256);
|
let mut validation = Validation::new(jsonwebtoken::Algorithm::HS256);
|
||||||
validation.set_audience(&["textsender"]); // Must match exactly what's in the token
|
validation.set_audience(&["schedtxt"]); // Must match exactly what's in the token
|
||||||
let _claims = decode::<schedtxt_models::token::Claims>(
|
let _claims = decode::<schedtxt_models::token::Claims>(
|
||||||
&token,
|
&token,
|
||||||
&DecodingKey::from_secret(secret_key.as_ref()),
|
&DecodingKey::from_secret(secret_key.as_ref()),
|
||||||
|
|||||||
+1
-1
@@ -93,7 +93,7 @@ pub mod init {
|
|||||||
event_responses::RecordMessageEventResponse
|
event_responses::RecordMessageEventResponse
|
||||||
)),
|
)),
|
||||||
tags(
|
tags(
|
||||||
(name = "textsender API", description = "Web API to manage texting")
|
(name = "schedtxt API", description = "Web API to manage texting")
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
struct ApiDoc;
|
struct ApiDoc;
|
||||||
|
|||||||
+2
-2
@@ -3,10 +3,10 @@ async fn main() {
|
|||||||
// initialize tracing
|
// initialize tracing
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
|
|
||||||
match tokio::net::TcpListener::bind(textsender_api::config::host::get_full()).await {
|
match tokio::net::TcpListener::bind(schedtxt_api::config::host::get_full()).await {
|
||||||
Ok(listener) => {
|
Ok(listener) => {
|
||||||
// build our application with routes
|
// build our application with routes
|
||||||
let app = textsender_api::config::init::app().await;
|
let app = schedtxt_api::config::init::app().await;
|
||||||
axum::serve(listener, app).await.unwrap();
|
axum::serve(listener, app).await.unwrap();
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|||||||
+71
-79
@@ -1,4 +1,4 @@
|
|||||||
use textsender_api::db;
|
use schedtxt_api::db;
|
||||||
|
|
||||||
mod db_mgr {
|
mod db_mgr {
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
@@ -101,7 +101,7 @@ mod db_mgr {
|
|||||||
|
|
||||||
mod init {
|
mod init {
|
||||||
pub async fn app(pool: sqlx::PgPool) -> axum::Router {
|
pub async fn app(pool: sqlx::PgPool) -> axum::Router {
|
||||||
textsender_api::config::init::routes()
|
schedtxt_api::config::init::routes()
|
||||||
.await
|
.await
|
||||||
.layer(axum::Extension(pool))
|
.layer(axum::Extension(pool))
|
||||||
.layer(axum::extract::DefaultBodyLimit::max(1024 * 1024 * 1024))
|
.layer(axum::extract::DefaultBodyLimit::max(1024 * 1024 * 1024))
|
||||||
@@ -136,8 +136,8 @@ mod util {
|
|||||||
pub fn token_fields() -> (String, String, String) {
|
pub fn token_fields() -> (String, String, String) {
|
||||||
(
|
(
|
||||||
String::from("What a twist!"),
|
String::from("What a twist!"),
|
||||||
String::from("textsender_test"),
|
String::from("schedtxt_test"),
|
||||||
String::from("textsender"),
|
String::from("schedtxt"),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ mod request {
|
|||||||
|
|
||||||
match run_post(
|
match run_post(
|
||||||
Some(&payload),
|
Some(&payload),
|
||||||
textsender_api::caller::endpoints::ADD_CONTACT,
|
schedtxt_api::caller::endpoints::ADD_CONTACT,
|
||||||
axum::http::Method::POST,
|
axum::http::Method::POST,
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@@ -257,11 +257,7 @@ mod request {
|
|||||||
app: &axum::Router,
|
app: &axum::Router,
|
||||||
id: &uuid::Uuid,
|
id: &uuid::Uuid,
|
||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = format!(
|
let uri = format!("{}?id={}", schedtxt_api::caller::endpoints::GET_CONTACT, id);
|
||||||
"{}?id={}",
|
|
||||||
textsender_api::caller::endpoints::GET_CONTACT,
|
|
||||||
id
|
|
||||||
);
|
|
||||||
|
|
||||||
match run_post(None, &uri, axum::http::Method::GET, false).await {
|
match run_post(None, &uri, axum::http::Method::GET, false).await {
|
||||||
Ok(req) => match app.clone().oneshot(req).await {
|
Ok(req) => match app.clone().oneshot(req).await {
|
||||||
@@ -289,7 +285,7 @@ mod request {
|
|||||||
|
|
||||||
match run_post(
|
match run_post(
|
||||||
Some(&payload),
|
Some(&payload),
|
||||||
textsender_api::caller::endpoints::UPDATE_CONTACT_NAME,
|
schedtxt_api::caller::endpoints::UPDATE_CONTACT_NAME,
|
||||||
axum::http::Method::PATCH,
|
axum::http::Method::PATCH,
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@@ -316,7 +312,7 @@ mod request {
|
|||||||
|
|
||||||
match super::run_post(
|
match super::run_post(
|
||||||
Some(&payload),
|
Some(&payload),
|
||||||
textsender_api::caller::endpoints::ADD_MESSAGE,
|
schedtxt_api::caller::endpoints::ADD_MESSAGE,
|
||||||
axum::http::Method::POST,
|
axum::http::Method::POST,
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@@ -334,11 +330,7 @@ mod request {
|
|||||||
app: &axum::Router,
|
app: &axum::Router,
|
||||||
id: &uuid::Uuid,
|
id: &uuid::Uuid,
|
||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = format!(
|
let uri = format!("{}?id={}", schedtxt_api::caller::endpoints::GET_MESSAGE, id);
|
||||||
"{}?id={}",
|
|
||||||
textsender_api::caller::endpoints::GET_MESSAGE,
|
|
||||||
id
|
|
||||||
);
|
|
||||||
|
|
||||||
match super::run_post(None, &uri, axum::http::Method::GET, false).await {
|
match super::run_post(None, &uri, axum::http::Method::GET, false).await {
|
||||||
Ok(req) => match app.clone().oneshot(req).await {
|
Ok(req) => match app.clone().oneshot(req).await {
|
||||||
@@ -379,7 +371,7 @@ mod request {
|
|||||||
|
|
||||||
match super::super::run_post(
|
match super::super::run_post(
|
||||||
Some(&payload),
|
Some(&payload),
|
||||||
textsender_api::caller::endpoints::RECORD_MESSAGE_EVENT_RESPONSE,
|
schedtxt_api::caller::endpoints::RECORD_MESSAGE_EVENT_RESPONSE,
|
||||||
axum::http::Method::POST,
|
axum::http::Method::POST,
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@@ -399,7 +391,7 @@ mod request {
|
|||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = format!(
|
let uri = format!(
|
||||||
"{}?id={}",
|
"{}?id={}",
|
||||||
textsender_api::caller::endpoints::GET_MESSAGE_EVENT_RESPONSE,
|
schedtxt_api::caller::endpoints::GET_MESSAGE_EVENT_RESPONSE,
|
||||||
id
|
id
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -436,7 +428,7 @@ mod request {
|
|||||||
|
|
||||||
match super::super::run_post(
|
match super::super::run_post(
|
||||||
Some(&payload),
|
Some(&payload),
|
||||||
textsender_api::caller::endpoints::SCHEDULE_MESSAGE,
|
schedtxt_api::caller::endpoints::SCHEDULE_MESSAGE,
|
||||||
axum::http::Method::POST,
|
axum::http::Method::POST,
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@@ -456,7 +448,7 @@ mod request {
|
|||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = format!(
|
let uri = format!(
|
||||||
"{}?id={}",
|
"{}?id={}",
|
||||||
textsender_api::caller::endpoints::GET_SCHEDULE_MESSAGE,
|
schedtxt_api::caller::endpoints::GET_SCHEDULE_MESSAGE,
|
||||||
id
|
id
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -474,7 +466,7 @@ mod request {
|
|||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
match super::super::run_post(
|
match super::super::run_post(
|
||||||
None,
|
None,
|
||||||
textsender_api::caller::endpoints::FETCH_SCHEDULED_MESSAGE,
|
schedtxt_api::caller::endpoints::FETCH_SCHEDULED_MESSAGE,
|
||||||
axum::http::Method::GET,
|
axum::http::Method::GET,
|
||||||
false,
|
false,
|
||||||
)
|
)
|
||||||
@@ -493,7 +485,7 @@ mod request {
|
|||||||
id: &uuid::Uuid,
|
id: &uuid::Uuid,
|
||||||
updated_status: &str,
|
updated_status: &str,
|
||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = textsender_api::caller::endpoints::UPDATE_SCHEDULED_MESSAGE_STATUS;
|
let uri = schedtxt_api::caller::endpoints::UPDATE_SCHEDULED_MESSAGE_STATUS;
|
||||||
let payload = serde_json::json!({
|
let payload = serde_json::json!({
|
||||||
"scheduled_message_id": id,
|
"scheduled_message_id": id,
|
||||||
"status": updated_status
|
"status": updated_status
|
||||||
@@ -526,7 +518,7 @@ mod request {
|
|||||||
|
|
||||||
match super::super::run_post(
|
match super::super::run_post(
|
||||||
Some(&payload),
|
Some(&payload),
|
||||||
textsender_api::caller::endpoints::CREATE_SCHEDULED_MESSAGE_EVENT,
|
schedtxt_api::caller::endpoints::CREATE_SCHEDULED_MESSAGE_EVENT,
|
||||||
axum::http::Method::POST,
|
axum::http::Method::POST,
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
@@ -546,7 +538,7 @@ mod request {
|
|||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = format!(
|
let uri = format!(
|
||||||
"{}?scheduled_message_id={}",
|
"{}?scheduled_message_id={}",
|
||||||
textsender_api::caller::endpoints::GET_SCHEDULED_MESSAGE_EVENT,
|
schedtxt_api::caller::endpoints::GET_SCHEDULED_MESSAGE_EVENT,
|
||||||
scheduled_message_id
|
scheduled_message_id
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -564,7 +556,7 @@ mod request {
|
|||||||
scheduled_message_event_id: &uuid::Uuid,
|
scheduled_message_event_id: &uuid::Uuid,
|
||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
let uri = super::super::super::util::format_url_with_value(
|
let uri = super::super::super::util::format_url_with_value(
|
||||||
textsender_api::caller::endpoints::DELETE_SCHEDULED_MESSAGE_EVENT,
|
schedtxt_api::caller::endpoints::DELETE_SCHEDULED_MESSAGE_EVENT,
|
||||||
scheduled_message_event_id,
|
scheduled_message_event_id,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
@@ -624,7 +616,7 @@ async fn test_create_contact() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -646,7 +638,7 @@ async fn test_get_contact() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -656,7 +648,7 @@ async fn test_get_contact() {
|
|||||||
match request::get_contact(&app, &id).await {
|
match request::get_contact(&app, &id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::GetContactResponse,
|
schedtxt_api::caller::contact::response::GetContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -689,7 +681,7 @@ async fn test_update_contact_names() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -699,7 +691,7 @@ async fn test_update_contact_names() {
|
|||||||
match request::get_contact(&app, &id).await {
|
match request::get_contact(&app, &id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::GetContactResponse,
|
schedtxt_api::caller::contact::response::GetContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -737,7 +729,7 @@ async fn test_update_contact_names() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::UpdateContactNamesResponse,
|
schedtxt_api::caller::contact::response::UpdateContactNamesResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Error updating Contact names");
|
assert_eq!(false, resp.data.is_empty(), "Error updating Contact names");
|
||||||
@@ -764,7 +756,7 @@ async fn test_create_message() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -792,7 +784,7 @@ async fn test_get_message() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -815,7 +807,7 @@ async fn test_get_message() {
|
|||||||
match request::message::get_message(&app, &message_id).await {
|
match request::message::get_message(&app, &message_id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::GetMessageResponse,
|
schedtxt_api::caller::message::response::GetMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -836,7 +828,7 @@ async fn test_schedule_message() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -859,7 +851,7 @@ async fn test_get_scheduled_message() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -875,7 +867,7 @@ async fn test_get_scheduled_message() {
|
|||||||
match request::message::scheduling::get_scheduled_messages(&app, &parsed_id).await {
|
match request::message::scheduling::get_scheduled_messages(&app, &parsed_id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::GetScheduledMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::GetScheduledMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -903,7 +895,7 @@ async fn test_create_scheduled_message_event() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -917,7 +909,7 @@ async fn test_create_scheduled_message_event() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -932,7 +924,7 @@ async fn test_create_scheduled_message_event() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -953,7 +945,7 @@ async fn test_create_scheduled_message_event() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -978,7 +970,7 @@ async fn test_get_scheduled_message_event() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -992,7 +984,7 @@ async fn test_get_scheduled_message_event() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1007,7 +999,7 @@ async fn test_get_scheduled_message_event() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1028,7 +1020,7 @@ async fn test_get_scheduled_message_event() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1043,7 +1035,7 @@ async fn test_get_scheduled_message_event() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1068,7 +1060,7 @@ async fn test_delete_scheduled_message_event() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1082,7 +1074,7 @@ async fn test_delete_scheduled_message_event() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1097,7 +1089,7 @@ async fn test_delete_scheduled_message_event() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1118,7 +1110,7 @@ async fn test_delete_scheduled_message_event() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1133,7 +1125,7 @@ async fn test_delete_scheduled_message_event() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::GetScheduledMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1146,7 +1138,7 @@ async fn test_delete_scheduled_message_event() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::DeleteScheduledMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::DeleteScheduledMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1176,7 +1168,7 @@ async fn test_update_scheduled_message_status() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1190,7 +1182,7 @@ async fn test_update_scheduled_message_status() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1205,7 +1197,7 @@ async fn test_update_scheduled_message_status() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1226,7 +1218,7 @@ async fn test_update_scheduled_message_status() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1245,7 +1237,7 @@ async fn test_update_scheduled_message_status() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1270,7 +1262,7 @@ async fn test_fetch_scheduled_message() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1284,7 +1276,7 @@ async fn test_fetch_scheduled_message() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1299,7 +1291,7 @@ async fn test_fetch_scheduled_message() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1320,7 +1312,7 @@ async fn test_fetch_scheduled_message() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1339,7 +1331,7 @@ async fn test_fetch_scheduled_message() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1352,7 +1344,7 @@ async fn test_fetch_scheduled_message() {
|
|||||||
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1378,7 +1370,7 @@ async fn test_record_message_event_response() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1392,7 +1384,7 @@ async fn test_record_message_event_response() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1407,7 +1399,7 @@ async fn test_record_message_event_response() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1428,7 +1420,7 @@ async fn test_record_message_event_response() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1449,7 +1441,7 @@ async fn test_record_message_event_response() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1462,7 +1454,7 @@ async fn test_record_message_event_response() {
|
|||||||
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1489,7 +1481,7 @@ async fn test_record_message_event_response() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::event::response::RecordMessageEventResponse,
|
schedtxt_api::caller::message::event::response::RecordMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1515,7 +1507,7 @@ async fn test_get_message_event_response() {
|
|||||||
match request::create_contact(&app).await {
|
match request::create_contact(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::contact::response::AddContactResponse,
|
schedtxt_api::caller::contact::response::AddContactResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1529,7 +1521,7 @@ async fn test_get_message_event_response() {
|
|||||||
match request::message::create_message(&app).await {
|
match request::message::create_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::response::AddMessageResponse,
|
schedtxt_api::caller::message::response::AddMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1544,7 +1536,7 @@ async fn test_get_message_event_response() {
|
|||||||
match request::message::scheduling::create_scheduled_message(&app).await {
|
match request::message::scheduling::create_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::ScheduleMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1565,7 +1557,7 @@ async fn test_get_message_event_response() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
schedtxt_api::caller::message::scheduling::response::CreateScheduleMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1586,7 +1578,7 @@ async fn test_get_message_event_response() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
schedtxt_api::caller::message::scheduling::response::UpdateScheduledMessageStatusResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1599,7 +1591,7 @@ async fn test_get_message_event_response() {
|
|||||||
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
match request::message::scheduling::fetch_scheduled_message(&app).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
schedtxt_api::caller::message::scheduling::response::FetchScheduledMessageResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1626,7 +1618,7 @@ async fn test_get_message_event_response() {
|
|||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::event::response::RecordMessageEventResponse,
|
schedtxt_api::caller::message::event::response::RecordMessageEventResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
@@ -1634,7 +1626,7 @@ async fn test_get_message_event_response() {
|
|||||||
match request::message::event::get_message_event_response(&app, &mer.id).await {
|
match request::message::event::get_message_event_response(&app, &mer.id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
let resp = util::get_resp_data::<
|
let resp = util::get_resp_data::<
|
||||||
textsender_api::caller::message::event::response::GetMERResponse,
|
schedtxt_api::caller::message::event::response::GetMERResponse,
|
||||||
>(response)
|
>(response)
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
|
||||||
|
|||||||
Reference in New Issue
Block a user