Skip to content

Instantly share code, notes, and snippets.

garlou / index.ts
Created Apr 7, 2021
Send raw email with attachment with AWS SES using Typescript
View index.ts
* This solution was built based on stackoverflow answer
* placed by user
import AWS from 'aws-sdk';
import {Template} from 'aws-sdk/clients/ses';
interface Attachment {
encoding: 'base64';
View application_controller.rb
def ensure_clinician_is_logged_in
respond_to do |format|
format.html { redirect_to "/clinicians/sign_in#{build_url_query}" unless current_clinician }
format.json do
response.headers['REQUIRES_AUTH'] = '1'
render js: "/clinicians/sign_in#{build_json_query}" unless current_clinician