Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Domain Support #6

Closed
noahbjohnson opened this issue Sep 30, 2019 · 1 comment · Fixed by #7
Closed

Custom Domain Support #6

noahbjohnson opened this issue Sep 30, 2019 · 1 comment · Fixed by #7
Labels

Comments

@noahbjohnson
Copy link
Contributor

noahbjohnson commented Sep 30, 2019

Our company uses a custom domain for our TW projects. It looks like adding support for this would be as simple as editing teamwork.js to test for a full qualified domain and overriding the base url here and here.

constructor(api_key, domain) {
        this.api_key = api_key
        this.domain = domain
        this.europe = domain.indexOf('.eu') === -1
        this.fqdn = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.){2,}([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]){2,}$/.test(domain)
    }

This will be true for teamwork.company.com but not for subdomain.eu so it should not be an issue with eu domains.

noahbjohnson added a commit to noahbjohnson/teamwork-api that referenced this issue Oct 1, 2019
noahbjohnson added a commit to noahbjohnson/teamwork-api that referenced this issue Oct 1, 2019
@moshie moshie closed this as completed in #7 Nov 4, 2020
@moshie
Copy link
Owner

moshie commented Nov 4, 2020

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@moshie moshie added the released label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants